4 reference
float amount;
5 protected float m_textProportion;
6 protected float m_textProportion2;
7 protected ButtonWidget m_root;
30 void OnWidgetScriptInit(ButtonWidget w)
33 m_root.SetHandler(
this);
37 protected void Update(
float tDelta)
40 float p = amount * m_anim.GetValue();
42 m_root.SetTextOffset( p * 4, 0 );
44 float c = 1.0 - m_anim.GetValue();
45 m_root.SetTextColor(
ARGBF(1, 1, c, c));
49 override bool OnFocus(
Widget w,
int x,
int y)
52 if ( !m_anim.IsRunning() )
54 m_root.GetPos( m_textProportion, m_textProportion2 );
56 m_anim.Animate(1.0, speed);
62 override bool OnFocusLost(
Widget w,
int x,
int y)
64 m_anim.Animate(0.0, speed);