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 | 23 | // EXTERNAL INCLUDES |
| 24 | 24 | #include <dali-toolkit/dali-toolkit.h> |
| 25 | 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 | 28 | using namespace Dali; |
| 28 | 29 | using namespace Dali::Toolkit; |
| ... | ... | @@ -181,6 +182,8 @@ public: |
| 181 | 182 | Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); |
| 182 | 183 | scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); |
| 183 | 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 | 188 | CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); |
| 186 | 189 | boxE.SetPosition( 0.0f, -100.0f, 1.0f ); |
| ... | ... | @@ -190,6 +193,7 @@ public: |
| 190 | 193 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500); |
| 191 | 194 | mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500); |
| 192 | 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 | 198 | mPanGestureDetector = PanGestureDetector::New(); |
| 195 | 199 | mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture ); | ... | ... |