-
- if( mTransitionAnimation )
- {
- return true;
- }
-
- return false;
-}
-
-void CheckBoxButton::StopAllAnimations()
-{
- StopTransitionAnimation();
-}
-
-void CheckBoxButton::StartTransitionAnimation( Actor& actor )
-{
- if( actor )
- {
- if( !mTickUVEffect )
- {
- ImageActor imageActor = ImageActor::DownCast( actor );
- mTickUVEffect = ImageRegionEffect::New();
- imageActor.SetShaderEffect( mTickUVEffect );
- }
-
- actor.SetScale( Vector3( 0.0f, 1.0f, 1.0f ) );
-
- mTickUVEffect.SetBottomRight( Vector2( 0.0f, 1.0f ) );
-
- if( !mTransitionAnimation )
- {
- mTransitionAnimation = Dali::Animation::New( GetAnimationTime() );
- }
-
- // UV anim
- mTransitionAnimation.AnimateTo( Property( mTickUVEffect, mTickUVEffect.GetBottomRightPropertyName() ), Vector2( 1.0f, 1.0f ) );
-
- // Actor size anim
- mTransitionAnimation.AnimateTo( Property( actor, Actor::Property::SCALE_X ), 1.0f );
-
- mTransitionAnimation.FinishedSignal().Connect( this, &CheckBoxButton::TransitionAnimationFinished );
- mTransitionAnimation.Play();
- }
-}
-
-void CheckBoxButton::StopTransitionAnimation( bool remove )
-{
- if( mTransitionAnimation )
- {
- mTransitionAnimation.Clear();
- mTransitionAnimation.Reset();
- }
-
- if( remove )
- {
- UpdatePaintTransitionState();
- }
-}
-
-void CheckBoxButton::TransitionAnimationFinished( Dali::Animation& source )
-{
- StopTransitionAnimation();