- case UnselectedState:
- {
- FadeOutImage( backgroundImage );
- FadeOutImage( buttonImage );
- FadeInImage( disabledBackgroundImage );
- FadeInImage( disabledImage );
- StartTransitionAnimation();
- break;
- }
- case SelectedState:
- {
- FadeOutImage( backgroundImage );
- FadeOutImage( selectedBackgroundImage );
- FadeOutImage( selectedImage );
- FadeInImage( disabledBackgroundImage );
- FadeInImage( disabledSelectedImage );
- StartTransitionAnimation();
- break;
- }
- case DisabledUnselectedState:
- {
- FadeOutImage( disabledBackgroundImage );
- FadeOutImage( disabledImage );
- FadeInImage( backgroundImage );
- FadeInImage( buttonImage );
- StartTransitionAnimation();
- break;
- }
- case DisabledSelectedState:
- {
- FadeOutImage( disabledBackgroundImage );
- FadeOutImage( disabledSelectedImage );
- FadeInImage( backgroundImage );
- FadeInImage( selectedBackgroundImage );
- FadeInImage( selectedImage );
- StartTransitionAnimation();
- break;
- }
- case UnselectedSelectedTransition:
- {
- float opacity = 1.f;
- if( selectedImage )
- {
- opacity = selectedImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation();
- FadeOutImage( backgroundImage );
- FadeOutImage( selectedBackgroundImage, opacity );
- FadeOutImage( selectedImage, opacity );
- FadeInImage( disabledBackgroundImage );
- FadeInImage( disabledSelectedImage );
- StartTransitionAnimation();
- break;
- }
- case SelectedUnselectedTransition:
- {
- float opacity = 1.f;
- if( buttonImage )
- {
- opacity = buttonImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation();
- FadeOutImage( backgroundImage );
- FadeOutImage( buttonImage, opacity );
- FadeInImage( disabledBackgroundImage );
- FadeInImage( disabledImage );
- StartTransitionAnimation();
- break;
- }
- case UnselectedDisabledTransition:
- {
- float opacity = 1.f;
- if( disabledImage )
- {
- opacity = disabledImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation( false );
- FadeOutImage( disabledBackgroundImage, opacity );
- FadeOutImage( disabledImage, opacity );
- FadeInImage( backgroundImage, 1.f - opacity );
- FadeInImage( buttonImage, 1.f - opacity );
- StartTransitionAnimation();
- break;
- }
- case DisabledUnselectedTransition:
- {
- float opacity = 1.f;
- if( buttonImage )
- {
- opacity = buttonImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation( false );
- FadeOutImage( backgroundImage, opacity );
- FadeOutImage( buttonImage, opacity );
- FadeInImage( disabledBackgroundImage, 1.f - opacity );
- FadeInImage( disabledImage, 1.f - opacity );
- StartTransitionAnimation();
- break;
- }
- case SelectedDisabledTransition:
- {
- float opacity = 1.f;
- if( disabledSelectedImage )
- {
- opacity = disabledSelectedImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation( false );
- FadeOutImage( disabledBackgroundImage, opacity );
- FadeOutImage( disabledSelectedImage, opacity );
- FadeInImage( backgroundImage, 1.f - opacity );
- FadeInImage( selectedBackgroundImage, 1.f - opacity );
- FadeInImage( selectedImage, 1.f - opacity );
- StartTransitionAnimation();
- break;
- }
- case DisabledSelectedTransition:
- {
- float opacity = 1.f;
- if( selectedImage )
- {
- opacity = selectedImage.GetCurrentOpacity();
- }
-
- StopTransitionAnimation( false );
- FadeOutImage( backgroundImage, opacity );
- FadeOutImage( selectedBackgroundImage, opacity );
- FadeOutImage( selectedImage, opacity );
- FadeInImage( disabledBackgroundImage, 1.f - opacity );
- FadeInImage( disabledSelectedImage, 1.f - opacity );
- StartTransitionAnimation();
- break;
- }