summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e7413a5)
Text jitter issue occurs when set a text again during text scrolling.
It is because the same property is used by the old and new animations. 2 PropertyResetters affect the same property.
So I've changed to use properties of Shader which is newly created every time.
Then the same property is not used by the old and new animation now.
Change-Id: I7ec9b266b0be48414d8df5e3ffead6e5c750b338
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters horizontalAlign[%f], verticalAlign[%f]\n", horizontalAlign, verticalAlign );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters horizontalAlign[%f], verticalAlign[%f]\n", horizontalAlign, verticalAlign );
- scrollingTextActor.RegisterProperty( "uTextureSize", textureSize );
- scrollingTextActor.RegisterProperty( "uHorizontalAlign", horizontalAlign );
- scrollingTextActor.RegisterProperty( "uVerticalAlign", verticalAlign );
- scrollingTextActor.RegisterProperty( "uGap", wrapGap );
- mScrollDeltaIndex = scrollingTextActor.RegisterProperty( "uDelta", 0.0f );
+ shader.RegisterProperty( "uTextureSize", textureSize );
+ shader.RegisterProperty( "uHorizontalAlign", horizontalAlign );
+ shader.RegisterProperty( "uVerticalAlign", verticalAlign );
+ shader.RegisterProperty( "uGap", wrapGap );
+ mScrollDeltaIndex = shader.RegisterProperty( "uDelta", 0.0f );
float scrollAmount = std::max( textureSize.width, controlSize.width );
float scrollDuration = scrollAmount / mScrollSpeed;
float scrollAmount = std::max( textureSize.width, controlSize.width );
float scrollDuration = scrollAmount / mScrollSpeed;
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::StartScrolling scrollAmount[%f] scrollDuration[%f], loop[%d] speed[%d]\n", scrollAmount, scrollDuration, loopCount, mScrollSpeed );
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::StartScrolling scrollAmount[%f] scrollDuration[%f], loop[%d] speed[%d]\n", scrollAmount, scrollDuration, loopCount, mScrollSpeed );
+ Shader shader = mRenderer.GetShader();
mScrollAnimation = Animation::New( scrollDuration );
mScrollAnimation = Animation::New( scrollDuration );
- mScrollAnimation.AnimateTo( Property( scrollingTextActor, mScrollDeltaIndex ), scrollAmount, TimePeriod( mLoopDelay, scrollDuration ) );
+ mScrollAnimation.AnimateTo( Property( shader, mScrollDeltaIndex ), scrollAmount, TimePeriod( mLoopDelay, scrollDuration ) );
mScrollAnimation.SetEndAction( Animation::Discard );
mScrollAnimation.SetLoopCount( loopCount );
mScrollAnimation.FinishedSignal().Connect( this, &TextScroller::AutoScrollAnimationFinished );
mScrollAnimation.SetEndAction( Animation::Discard );
mScrollAnimation.SetLoopCount( loopCount );
mScrollAnimation.FinishedSignal().Connect( this, &TextScroller::AutoScrollAnimationFinished );