3 const ref Color COLOR_DEFAULT =
new Color(0,0,0,0.6);
4 const ref Color COLOR_FOCUSED =
new Color(1,1,1,0.06);
5 const ref Color COLOR_HOVERED =
new Color(1,1,1,0.06);
6 const ref Color COLOR_PRESSED =
new Color(0.8,0.8,0.8,0.06);
9 protected string m_sSoundFocused;
12 protected string m_sSoundClicked;
15 override void HandlerAttached(Widget w)
17 w.SetColor(COLOR_DEFAULT);
24 override bool OnClick(Widget w,
int x,
int y,
int button)
27 AnimateWidget.Color(w, COLOR_PRESSED,
UIConstants.FADE_RATE_DEFAULT);
33 override bool OnFocus(Widget w,
int x,
int y)
36 AnimateWidget.Color(w, COLOR_FOCUSED,
UIConstants.FADE_RATE_DEFAULT);
41 override bool OnFocusLost(Widget w,
int x,
int y)
43 AnimateWidget.Color(w, COLOR_DEFAULT,
UIConstants.FADE_RATE_DEFAULT);
48 override bool OnMouseEnter(Widget w,
int x,
int y)
50 GetGame().GetWorkspace().SetFocusedWidget(w);