Commit ecfeadc4f00a61128705435a4f50d8c1c1256b3b
1 parent
3297b0f6
Text scrolling example use scrolling stop mode(FINISH_LOOP, IMMEDIATE) and loop delay
Change-Id: I991ccd799fd33bcfcf9ebfd392c0b429065996cb
Showing
1 changed file
with
4 additions
and
0 deletions
examples/text-scrolling/text-scrolling-example.cpp
| @@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
| 23 | // EXTERNAL INCLUDES | 23 | // EXTERNAL INCLUDES |
| 24 | #include <dali-toolkit/dali-toolkit.h> | 24 | #include <dali-toolkit/dali-toolkit.h> |
| 25 | #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> | 25 | #include <dali-toolkit/devel-api/controls/buttons/button-devel.h> |
| 26 | +#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h> | ||
| 26 | 27 | ||
| 27 | using namespace Dali; | 28 | using namespace Dali; |
| 28 | using namespace Dali::Toolkit; | 29 | using namespace Dali::Toolkit; |
| @@ -181,6 +182,8 @@ public: | @@ -181,6 +182,8 @@ public: | ||
| 181 | Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); | 182 | Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); |
| 182 | scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); | 183 | scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); |
| 183 | CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton ); | 184 | CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton ); |
| 185 | + mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE ); | ||
| 186 | + mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); | ||
| 184 | 187 | ||
| 185 | CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); | 188 | CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); |
| 186 | boxE.SetPosition( 0.0f, -100.0f, 1.0f ); | 189 | boxE.SetPosition( 0.0f, -100.0f, 1.0f ); |
| @@ -190,6 +193,7 @@ public: | @@ -190,6 +193,7 @@ public: | ||
| 190 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500); | 193 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500); |
| 191 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500); | 194 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500); |
| 192 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3); | 195 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3); |
| 196 | + mRtlLongLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP ); | ||
| 193 | 197 | ||
| 194 | mPanGestureDetector = PanGestureDetector::New(); | 198 | mPanGestureDetector = PanGestureDetector::New(); |
| 195 | mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture ); | 199 | mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture ); |