6 const string WIDGET_IMAGE =
"Image";
8 [
Attribute(
"1", UIWidgets.CheckBox,
"Speed of rotation")]
9 protected float m_fSpeed;
11 protected bool m_bIsPlayingAnimation;
12 protected bool m_bIsAnimationDone;
14 SizeLayoutWidget m_wRootSize;
18 override void HandlerAttached(Widget w)
20 super.HandlerAttached(w);
24 m_wRootSize = SizeLayoutWidget.Cast(
m_wRoot);
27 m_bIsPlayingAnimation =
true;
28 m_bIsAnimationDone =
true;
34 protected void Animate()
40 WidgetAnimationBase anim = AnimateWidget.Rotation(
m_wImage, 360, m_fSpeed);
42 anim.GetOnCompleted().Insert(Animate);
59 void SetSpeed(
float speed) { m_fSpeed = speed; }
62 float GetSpeed() {
return m_fSpeed; }
65 void GetIsPlayingAnimation(
bool playing) { m_bIsPlayingAnimation = playing; }
68 bool GetIsPlayingAnimation() {
return m_bIsPlayingAnimation; }