3 protected int m_SelectorType = 0;
9 protected ScriptedWidgetEventHandler m_ParentClass;
42 m_ParentClass.OnFocus(
m_Root.GetParent(), -1, m_SelectorType);
43 #ifndef PLATFORM_CONSOLE
44 m_ParentClass.OnMouseEnter(
m_Root.GetParent().GetParent(),
x,
y);
50 if (menu && menu.IsInherited(CharacterCreationMenu))
56 #ifndef PLATFORM_CONSOLE
59 ColorHighlightConsole(w);
62 m_ParentClass.OnFocus(
m_Root.GetParent(), -1, m_SelectorType);
71 #ifdef PLATFORM_CONSOLE
78 m_ParentClass.OnFocus(null,
x,
y);
79 #ifndef PLATFORM_CONSOLE
80 m_ParentClass.OnMouseLeave(
m_Root.GetParent().GetParent(), enterW,
x,
y);
86 if (menu && menu.IsInherited(CharacterCreationMenu))
92 #ifndef PLATFORM_CONSOLE
98 m_ParentClass.OnFocusLost(w,
x,
y);
105 override bool OnFocus(Widget w,
int x,
int y)
109 ColorHighlightConsole(w);
112 m_ParentClass.OnFocus(
m_Root.GetParent(), -1, m_SelectorType);
124 m_ParentClass.OnFocusLost(w,
x,
y);
131 #ifndef PLATFORM_CONSOLE
144 #ifdef PLATFORM_CONSOLE
157 #ifdef PLATFORM_CONSOLE
169 ButtonSetColor(w,
ARGB(255, 255, 0, 0));
177 int color_pnl =
ARGB(255, 255, 255, 255);
178 int color_lbl =
ARGB(255, 255, 255, 255);
180 ButtonSetColor(w, color_pnl);
182 Widget title_label = w.FindAnyWidget(w.GetName() +
"_label");
183 Widget option_label = w.FindAnyWidget(
"option_label");
187 title_label.SetColor(color_lbl);
192 option_label.SetColor(color_lbl);
196 void ColorDisabled(Widget w)
201 int color_pnl =
ARGB(0, 0, 0, 0);
202 int color_lbl =
ARGB(120, 255, 255, 255);
204 ButtonSetColor(w, color_pnl);
206 Widget title_label = w.FindAnyWidget(w.GetName() +
"_label");
207 Widget option_label = w.FindAnyWidget(
"option_label");
211 title_label.SetColor(color_lbl);
216 option_label.SetColor(color_lbl);
220 void ButtonSetColor(Widget w,
int color)
222 Widget option = w.FindAnyWidget(w.GetName() +
"_image");
226 option.SetColor(color);
230 void ColorHighlightConsole(Widget w)
235 int color_pnl =
ARGB(255, 200, 0, 0);
236 int color_lbl =
ARGB(255, 255, 255, 255);
238 ButtonSetColorConsole(w, color_pnl);
239 ButtonSetAlphaAnimConsole(null);
240 ButtonSetTextColorConsole(w, color_lbl);
248 int color_pnl =
ARGB(0, 0, 0, 0);
249 int color_lbl =
ARGB(255, 255, 255, 255);
251 ButtonSetColorConsole(w, color_pnl);
252 ButtonSetAlphaAnimConsole(null);
253 ButtonSetTextColorConsole(w, color_lbl);
261 int color_pnl =
ARGB(0, 0, 0, 0);
262 int color_lbl =
ARGB(120, 255, 255, 255);
264 ButtonSetColorConsole(w, color_pnl);
265 ButtonSetAlphaAnimConsole(null);
266 ButtonSetTextColorConsole(w, color_lbl);
269 void ButtonSetColorConsole(Widget w,
int color)
274 void ButtonSetAlphaAnimConsole(Widget w)
279 Widget panel = w.FindAnyWidget(w.GetName() +
"_panel");
287 void ButtonSetTextColorConsole(Widget w,
int color)
292 TextWidget label = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_label"));
293 TextWidget text = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text"));
294 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() +
"_text_1"));
298 label.SetColor(color);
303 text.SetColor(color);
308 text2.SetColor(color);
override bool OnFocus(Widget w, int x, int y)
override bool IsFocusable(Widget w)
override bool OnFocusLost(Widget w, int x, int y)
override void ColorNormalConsole(Widget w)
override void ColorHighlight(Widget w)
override void ColorDisabledConsole(Widget w)
override bool OnMouseEnter(Widget w, int x, int y)
override void ColorNormal(Widget w)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
ScriptInvoker Class provide list of callbacks usage:
proto native CGame GetGame()
int ARGB(int a, int r, int g, int b)