5 reference
float amount;
6 protected float m_orginal_width;
7 protected float m_orginal_height;
17 void OnWidgetScriptInit(
Widget w)
20 m_root.SetHandler(
this);
24 protected void Update()
26 float p = amount * m_anim.GetValue();
27 m_root.SetSize(m_orginal_width + (m_orginal_width * p), m_orginal_height + (m_orginal_height * p));
29 float c = 1.0 - (0.5 * m_anim.GetValue());
30 m_root.SetColor(
ARGBF(1, 1, c, c));
34 override bool OnMouseEnter(
Widget w,
int x,
int y)
36 if ( !m_anim.IsRunning() ) m_root.GetSize(m_orginal_width, m_orginal_height);
37 m_anim.Animate(1.0, speed);
45 m_anim.Animate(0.0, speed);