DayZ 1.24
Loading...
Searching...
No Matches
ControlsXboxNew.c
Go to the documentation of this file.
1
2//used as UserID in the layout. Values assigned for convenience here
4{
5 INVALID = 0, //assumed unassigned value, ignored (dividers, formatting elements etc.)
25
26typedef map<int, ref array<Widget>> TButtonPairingInfo; //<button_mask,<associated widgets on the respective side>>
27
29{
30 protected string m_BackButtonTextID;
31 protected string m_NextPresetText;
32 protected int m_CurrentTabIdx = -1;
33 protected int m_CurrentPresetVariant = -1;
34
37
38 //-------------
43 protected Widget m_PlatformHolder; //controls container for selected platform
45
48 protected ref map<int, ref TButtonPairingInfo> m_AreasLR; //left/right area holders
49
50 protected const int AREA_LEFT = 1;
51 protected const int AREA_RIGHT = 2;
52 protected const int PLATFORM_ADJUST_X1 = 1000;
53 protected const int PLATFORM_ADJUST_PS = 2000;
54
55 //============================================
56 // ControlsXboxNew
57 //============================================
59 {
60 PPERequesterBank.GetRequester(PPERequesterBank.REQ_MENUEFFECTS).Stop();
61 }
62
63 protected void OnInputPresetChanged()
64 {
65#ifdef PLATFORM_CONSOLE
68#endif
69 }
70
75
76 void Back()
77 {
78 GetGame().GetUIManager().Back();
79 }
80
82 {
83 Widget w;
84 //hide old
85 if (m_CurrentTabIdx != -1)
86 {
87 m_VariantWidget.Show(false);
88 while (m_VariantWidget.GetParent())
89 {
90 m_VariantWidget = m_VariantWidget.GetParent();
91 m_VariantWidget.Show(false);
92 }
93 }
94 //show new
95 w = FindChildByID(m_CategoryStructure[tab_index], InputUtils.GetConsolePresetID());
96 w.Show(true);
97 m_VariantWidget = w;
98
99 while (w.GetParent())
100 {
101 w = w.GetParent();
102 w.Show(true);
103 }
104
106 m_CurrentTabIdx = tab_index;
107 }
108
109 protected void DrawConnectingLines(int index)
110 {
111 //disconnected for now, to be finished
112 return;
113
114 m_CanvasWidget.Clear();
115
116 //TODO drawing over nyah
117 m_VariantWidget;
118 m_AreasLR = new map<int, ref TButtonPairingInfo>;
119
120 Widget wid_side; //left or right area
121 Widget wid_spacer; //item in the L/R areas
122 wid_side = m_VariantWidget.GetChildren();
123 typename t = EConsoleButtonsControls;
124 int side_idx;
125 int enum_value;
128
129 while (wid_side)
130 {
132
133 side_idx = wid_side.GetUserID();
134 wid_spacer = wid_side.GetChildren(); //dig into the side first..
135
136 for (int i = 1; i < EnumTools.GetEnumSize(EConsoleButtonsControls); i++)
137 {
140 t.GetVariableValue(null, i, enum_value); //TODO
141
142 FindAllChildrenByID(wid_spacer, enum_value, items_raw);
143 if (FilterByVisible(items_raw, items_filtered) > 0) //if there are any button-relevant items..
144 {
146
147 //dump it!
148 /*
149 for (int dump = 0; dump < items_filtered.Count(); dump++)
150 {
151 Print("key: " + i + " | name: " + items_filtered[dump].GetName());
152 }
153 Print("-");
154 */
155 }
156 }
157 m_AreasLR.Insert(side_idx, button_mapping);
158
159 wid_side = wid_side.GetSibling();
160 }
161
162 //dump it 2: the dumpening!
163 /*
164 int count_2 = m_AreasLR.Count();
165 for (int z = 0; z < m_AreasLR.Count(); z++)
166 {
167 Print("---------");
168 Print("Area: " + z);
169 TButtonPairingInfo tmp_info = m_AreasLR.GetElement(z);
170 int count_1 = tmp_info.Count();
171 for (int zz = 0; zz < tmp_info.Count(); zz++)
172 {
173 for (int zzz = 0; zzz < tmp_info.GetElement(zz).Count(); zzz++)
174 {
175 Print("key: " + tmp_info.GetKey(zz) + " | name: " + tmp_info.GetElement(zz).Get(zzz).GetName());
176 }
177 }
178 }
179
180 Print("------------------------");
181 */
182 /*
183 map<string, ref array<int>> button_marker_groups_unflitred = new map<string, ref array<int>>;
184 map<string, ref array<int>> button_marker_groups = new map<string, ref array<int>>;
185
186 float text_widget_pos_x, text_widget_pos_y;
187 float text_widget_width, text_widget_height;
188 float dot_pos_x, dot_pos_y;
189 float dot_width, dot_height;
190 float draw_pos_x, draw_pos_y;
191
192 m_CanvasWidget.Clear();
193
194 for (int i = 0; i < m_TabScript.GetTabCount(); i++)
195 {
196 tab_array.Insert(new array<ref JsonControlMappingInfo>);
197 for (int j = 0; j < 20; j++)
198 {
199 tab_array[i].Insert(null);
200 }
201 }
202
203 // insert json info to array by index, so it is sorted
204 for (i = 0; i < control_mapping_info.Count(); i++)
205 {
206 JsonControlMappingInfo info = control_mapping_info.Get(i);
207 tab_array[info.m_TabID][info.m_TextWidgetID] = info;
208 }
209
210 // create group of buttons which are connected together with line
211 for (int l = 0; l < control_mapping_info.Count(); l++)
212 {
213 JsonControlMappingInfo info1 = control_mapping_info[l];
214 string button_name = info1.m_ButtonName;
215 int text_widget_id = info1.m_TextWidgetID;
216 if (info1.m_TabID != index)
217 {
218 continue;
219 }
220 if (!button_marker_groups_unflitred.Contains(button_name))
221 {
222 button_marker_groups_unflitred.Insert(button_name, new ref array<int>);
223 button_marker_groups_unflitred.Get(button_name).Insert(text_widget_id);
224 }
225 else
226 {
227 button_marker_groups_unflitred.Get(button_name).Insert(text_widget_id);
228 }
229 }
230
231 // we want groups which are bigger than 1
232 for (l = 0; l < button_marker_groups_unflitred.Count(); l++)
233 {
234 if (button_marker_groups_unflitred.GetElement(l).Count() > 1)
235 {
236 string key = button_marker_groups_unflitred.GetKey(l);
237 button_marker_groups.Insert(button_marker_groups_unflitred.GetKey(l), button_marker_groups_unflitred.Get(key));
238 }
239 }
240
241 Widget panel_widget;
242 Widget button_marker_widget;
243
244 for (l = 0; l < tab_array[index].Count(); l++)
245 {
246 panel_widget = layoutRoot.FindAnyWidget("PanelWidget" + l);
247 if (tab_array[index][l] != null)
248 {
249 TextWidget text_widget = TextWidget.Cast(panel_widget.FindAnyWidget("TextWidget" + l));
250
251 string key_prefix;
252 #ifdef PLATFORM_XBOX
253 key_prefix = "xb_button_marker_";
254 #else
255 #ifdef PLATFORM_PS4
256 key_prefix = "ps_button_marker_";
257 #endif
258 #endif
259
260 button_marker_widget = layoutRoot.FindAnyWidget(key_prefix + tab_array[index][l].m_ButtonName);
261 text_widget.SetText(tab_array[index][l].m_InfoText);
262 panel_widget.Show(true);
263 button_marker_widget.Show(true);
264 panel_widget.Update();
265 if (!button_marker_groups.Contains(tab_array[index][l].m_ButtonName))
266 {
267 panel_widget.GetScreenPos(text_widget_pos_x, text_widget_pos_y);
268 panel_widget.GetScreenSize(text_widget_width,text_widget_height);
269
270 button_marker_widget.GetScreenPos(dot_pos_x, dot_pos_y);
271 button_marker_widget.GetScreenSize(dot_width, dot_height);
272
273 draw_pos_y = text_widget_pos_y + text_widget_height / 2;
274 if (l < 10)
275 {
276 draw_pos_x = text_widget_pos_x + text_widget_width - 1;
277 }
278 else
279 {
280 draw_pos_x = text_widget_pos_x;
281 }
282 m_CanvasWidget.DrawLine(draw_pos_x, draw_pos_y, dot_pos_x+dot_width/2, draw_pos_y, 2, ARGBF(0.6, 1, 1, 1));
283 m_CanvasWidget.DrawLine(dot_pos_x+dot_width/2, draw_pos_y, dot_pos_x+dot_width/2, dot_pos_y+dot_height/2, 2, ARGBF(0.6, 1, 1, 1));
284 }
285 }
286 else
287 {
288 panel_widget.Show(false);
289 }
290 panel_widget.Update();
291 }
292
293 // draw connecting lines
294 for (l = 0; l < button_marker_groups.Count(); l++)
295 {
296 text_widget_pos_x = 0;
297 text_widget_pos_y = 0;
298 text_widget_width = 0;
299 text_widget_height = 0;
300 float group_point_x = 0, group_point_y = 0;
301 float first_x = 0, first_y = 0;
302
303 ref array<int> element = button_marker_groups.GetElement(l);
304 string key_name = button_marker_groups.GetKey(l);
305 #ifdef PLATFORM_XBOX
306 key_prefix = "xb_button_marker_";
307 #else
308 #ifdef PLATFORM_PS4
309 key_prefix = "ps_button_marker_";
310 #endif
311 #endif
312 button_marker_widget = layoutRoot.FindAnyWidget(key_prefix + key_name);
313
314 for (int g = 0; g < element.Count(); g++)
315 {
316 panel_widget = layoutRoot.FindAnyWidget("PanelWidget" + element[g]);
317
318 panel_widget.GetScreenPos(text_widget_pos_x, text_widget_pos_y);
319 panel_widget.GetScreenSize(text_widget_width, text_widget_height);
320
321 if (g == 0)
322 {
323 if (element[0] < 10)
324 {
325 first_x = text_widget_pos_x + text_widget_width +50;
326 }
327 else
328 {
329 first_x = text_widget_pos_x - 50;
330 }
331
332 first_y = text_widget_pos_y + text_widget_height/2;
333 }
334
335 group_point_x += text_widget_pos_x;
336 group_point_y += text_widget_pos_y;
337 if (element[0] < 10)
338 {
339 m_CanvasWidget.DrawLine(text_widget_pos_x + text_widget_width - 1, text_widget_pos_y + text_widget_height/2, text_widget_pos_x + text_widget_width +50, text_widget_pos_y + text_widget_height/2, 2, ARGBF(0.6, 1, 1, 1));
340 }
341 else
342 {
343 m_CanvasWidget.DrawLine(text_widget_pos_x, text_widget_pos_y + text_widget_height/2, text_widget_pos_x - 50, text_widget_pos_y + text_widget_height/2, 2, ARGBF(0.6, 1, 1, 1));
344 }
345 }
346 if (element[0] < 10)
347 {
348 group_point_x = group_point_x/element.Count() + text_widget_width + 50;
349 }
350 else
351 {
352 group_point_x = group_point_x/element.Count() - 50;
353 }
354
355 if (element.Count() % 2 == 0)
356 {
357 group_point_y = ((text_widget_pos_y + text_widget_height/2) - first_y) / 2 + first_y;
358 }
359 else
360 {
361 float text_widget_pos_x_center, text_widget_pos_y_center;
362 float text_widget_width_center, text_widget_height_center;
363
364 panel_widget = layoutRoot.FindAnyWidget("PanelWidget" + element[1]);
365
366 panel_widget.GetScreenPos(text_widget_pos_x_center, text_widget_pos_y_center);
367 panel_widget.GetScreenSize(text_widget_width_center, text_widget_height_center);
368
369 group_point_y = text_widget_pos_y_center + text_widget_height_center / 2;
370 }
371
372 button_marker_widget.GetScreenPos(dot_pos_x, dot_pos_y);
373 button_marker_widget.GetScreenSize(dot_width, dot_height);
374
375 m_CanvasWidget.DrawLine(group_point_x, group_point_y, dot_pos_x+dot_width/2, group_point_y, 2, ARGBF(0.6, 1, 1, 1));
376 m_CanvasWidget.DrawLine(dot_pos_x+dot_width/2, group_point_y, dot_pos_x+dot_width/2, dot_pos_y, 2, ARGBF(0.6, 1, 1, 1));
377
378 if (element[0] < 10)
379 {
380 m_CanvasWidget.DrawLine(first_x, first_y, text_widget_pos_x + text_widget_width +50, text_widget_pos_y + text_widget_height/2, 2, ARGBF(0.6, 1, 1, 1));
381 }
382 else
383 {
384 m_CanvasWidget.DrawLine(first_x, first_y, text_widget_pos_x - 50, text_widget_pos_y + text_widget_height/2, 2, ARGBF(0.6, 1, 1, 1));
385 }
386 }
387 */
388 }
389
390 //============================================
391 // Init
392 //============================================
393 override Widget Init()
394 {
395 m_CategoryStructure = new map<int, Widget>;
396 m_ImageMarkerStructure = new map<int, Widget>;
397
398 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/xbox/Controls_Screen.layout");
399#ifdef PLATFORM_XBOX
400 m_ControlsImage = layoutRoot.FindAnyWidget("XboxControlsImage");
401#else
402#ifdef PLATFORM_PS4
403 m_ControlsImage = layoutRoot.FindAnyWidget("PSControlsImage");
404#endif
405#endif
406 m_ControlsImage.Show(true);
407 m_TabberWidget = layoutRoot.FindAnyWidget("Tabber");
408 m_TabberWidget.GetScript(m_TabScript);
409 m_TabScript.m_OnTabSwitch.Insert(UpdateTabContent);
410 m_CanvasWidget = CanvasWidget.Cast(layoutRoot.FindAnyWidget("CanvasUniversal"));
411 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget("back"));
412
413 UpdateToolbarText();
416
418 Class.CastTo(requester, PPERequesterBank.GetRequester(PPERequesterBank.REQ_MENUEFFECTS));
419 requester.SetVignetteIntensity(0.6);
420
421 ComposeData();
422 UpdateTabContent(0);
423
424 GetGame().GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
425 GetGame().GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
426
427 OnInputDeviceChanged(GetGame().GetInput().GetCurrentInputDevice());
428
429
430 return layoutRoot;
431 }
432
433 override void OnShow()
434 {
435 super.OnShow();
436
437 SetFocus(null);
438 }
439
440 override bool OnClick(Widget w, int x, int y, int button)
441 {
442 if (button == MouseState.LEFT)
443 {
444 if (w == m_Back)
445 {
446 Back();
447 return true;
448 }
449 }
450 return false;
451 }
452
453 override bool OnMouseEnter(Widget w, int x, int y)
454 {
455 if (IsFocusable(w))
456 {
458 return true;
459 }
460 return false;
461 }
462
463 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
464 {
465 if (IsFocusable(w))
466 {
467 ColorNormal(w);
468 return true;
469 }
470 return false;
471 }
472
473 override bool OnFocus(Widget w, int x, int y)
474 {
475 if (IsFocusable(w))
476 {
478 return true;
479 }
480 return false;
481 }
482
483 override bool OnFocusLost(Widget w, int x, int y)
484 {
485 if (IsFocusable(w))
486 {
487 ColorNormal(w);
488 return true;
489 }
490 return false;
491 }
492
494 {
495 return (w && w == m_Back);
496 }
497
498 override void Update(float timeslice)
499 {
500 if (GetUApi().GetInputByID(UAUITabLeft).LocalPress())
501 m_TabScript.PreviousTab();
502
503 if (GetUApi().GetInputByID(UAUITabRight).LocalPress())
504 m_TabScript.NextTab();
505
506 if (GetUApi().GetInputByID(UAUIBack).LocalPress())
507 Back();
508
509 if (GetUApi().GetInputByID(UASwitchPreset).LocalPress())
510 {
511 PerformSwitchPreset();
512 UpdateTabContent(m_CurrentTabIdx);
513 m_TabScript.RefreshTab();
514 }
515 }
516
518 protected void ComposeData()
519 {
520 if (m_CategoryStructure)
521 {
522 m_CategoryStructure = null;
523 m_CategoryStructure = new map<int, Widget>;
524 }
525
526 if (m_ImageMarkerStructure)
527 {
528 m_ImageMarkerStructure = null;
529 m_ImageMarkerStructure = new map<int, Widget>;
530 }
531
532 Widget w = m_ControlsImage.GetChildren();
533 m_ImageMarkerStructure.Set(w.GetUserID(), w);
534
535 while (w.GetSibling())
536 {
537 w = w.GetSibling();
538 m_ImageMarkerStructure.Set(w.GetUserID(), w); //inits button markers with their IDs
539 }
540
542
543#ifdef PLATFORM_XBOX
544 m_PlatformHolder = FindChildByID(layoutRoot, PLATFORM_ADJUST_X1);
545#else
546 m_PlatformHolder = FindChildByID(layoutRoot, PLATFORM_ADJUST_PS);
547#endif
548
549 //categories
550 Widget category_widget = m_PlatformHolder.GetChildren();
551 m_CategoryStructure.Set(category_widget.GetUserID(), category_widget);
552
553 while (category_widget.GetSibling())
554 {
555 category_widget = category_widget.GetSibling();
556 m_CategoryStructure.Set(category_widget.GetUserID(), category_widget);
557 }
558 }
559
560 protected void PerformSwitchPreset()
561 {
562 int index;
563 string preset_text;
565
566 index = inputAPI.PresetCurrent() + 1;
567 if (index >= inputAPI.PresetCount())
568 index = 0;
569
570 inputAPI.SupressNextFrame(true);
571 inputAPI.PresetSelect(index);
572 UpdateToolbarText();
573
574 GetGame().GetMission().GetOnInputPresetChanged().Invoke();
575
576#ifdef PLATFORM_WINDOWS
577 GetUApi().Export(); //works on emulated consoles (-xbox,-ps4)
578#else
579 GetUApi().SaveInputPresetMiscData(); //default console functionality
580#endif
581
584 }
585
586 protected void UpdateToolbarText()
587 {
589 int target_idx = inputAPI.PresetCurrent() + 1;
590 int count = inputAPI.PresetCount();
591 if (target_idx >= inputAPI.PresetCount())
592 target_idx = 0;
593
594 m_NextPresetText = inputAPI.PresetName(target_idx);
595 if (m_NextPresetText == InputUtils.PRESET_OLD)
596 m_NextPresetText = "#STR_UAPRESET_ChangeTo_0";
597 else if (m_NextPresetText == InputUtils.PRESET_NEW)
598 m_NextPresetText = "#STR_UAPRESET_ChangeTo_1";
599 else
600 m_NextPresetText = "Invalid console preset name: " + m_NextPresetText;
601 }
602
605 {
606 Widget ret = wid.GetChildren();
607 while (ret)
608 {
609 if (ret.GetUserID() == user_id)
610 return ret;
611 ret = ret.GetSibling();
612 }
613 return ret;
614 }
615
618 {
619 Widget child = wid.GetChildren();
620 while (child)
621 {
622 if (child.GetUserID() == user_id)
623 results.Insert(child);
624 child = child.GetSibling();
625 }
626 return (results && results.Count() > 0);
627 }
628
631 {
632 for (int i = 0; i < input.Count(); i++)
633 {
634 if (input[i].IsVisible())
635 filtered.Insert(input[i]);
636 }
637
638 return filtered.Count();
639 }
640
642 {
643 if (!w)
644 return;
645
646 int color_pnl = ARGB(255, 0, 0, 0);
647 int color_lbl = ARGB(255, 255, 0, 0);
648
649#ifdef PLATFORM_CONSOLE
650 color_pnl = ARGB(255, 200, 0, 0);
651 color_lbl = ARGB(255, 255, 255, 255);
652#endif
653
654 ButtonSetColor(w, color_pnl);
655 ButtonSetTextColor(w, color_lbl);
656 }
657
659 {
660 if (!w)
661 return;
662
663 int color_pnl = ARGB(0, 0, 0, 0);
664 int color_lbl = ARGB(255, 255, 255, 255);
665
666 ButtonSetColor(w, color_pnl);
667 ButtonSetTextColor(w, color_lbl);
668 }
669
671 {
672 if (!w)
673 return;
674
675 TextWidget label = TextWidget.Cast(w.FindWidget(w.GetName() + "_label"));
676
677 if (label)
678 label.SetText(text);
679
680 }
681
683 {
684 if (!w)
685 return;
686
687 Widget panel = w.FindWidget(w.GetName() + "_panel");
688
689 if (panel)
690 panel.SetColor(color);
691 }
692
694 {
695 if (!w)
696 return;
697
698 TextWidget label = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_label"));
699 TextWidget text = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text"));
700 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text_1"));
701
702 if (label)
703 label.SetColor(color);
704
705 if (text)
706 text.SetColor(color);
707
708 if (text2)
709 text2.SetColor(color);
710 }
711
712 protected void UpdateControlsElements()
713 {
714 RichTextWidget toolbar_switch = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ChangePresetText"));
716
717 RichTextWidget toolbar_text = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ContextToolbarText"));
718 string text = string.Format(" %1", InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "#STR_settings_menu_root_toolbar_bg_ConsoleToolbar_Back_BackText0", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
719 toolbar_text.SetText(text);
720
721 RichTextWidget toolbar_b2 = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon0"));
723 }
724
726 {
727 bool toolbarShow = false;
728#ifdef PLATFORM_CONSOLE
729 toolbarShow = !GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer() || GetGame().GetInput().GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
730#endif
731
732 layoutRoot.FindAnyWidget("toolbar_bg").Show(toolbarShow);
733 layoutRoot.FindAnyWidget("play_panel_root").Show(!toolbarShow);
734 }
735}
void OnInputPresetChanged()
Definition Inventory.c:160
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Definition Inventory.c:167
ActionInput GetInput()
Definition ActionBase.c:989
void DrawConnectingLines(int index)
TabberUI m_TabScript
ButtonWidget m_Back
void Back()
enum map TButtonPairingInfo
@ BUTTON_A
@ BUTTON_PAD_LEFT
@ BUTTON_TRIGGER_RIGHT
@ BUTTON_SHOULDER_RIGHT
@ BUTTON_X
@ BUTTON_PAD_UP
@ BUTTON_GROUP_PAD_COMMON
@ BUTTON_TRIGGER_LEFT
@ BUTTON_B
@ BUTTON_PAD_RIGHT
@ BUTTON_PAD_DOWN
@ BUTTON_SHOULDER_LEFT
@ BUTTON_THUMB_LEFT
@ BUTTON_MENU
@ BUTTON_VIEW
@ INVALID
@ BUTTON_THUMB_RIGHT
@ BUTTON_GROUP_RIGHT_SIDE_COMMON
@ BUTTON_Y
Icon x
Icon y
void UpdateControlsElementVisibility()
void UpdateControlsElements()
void ColorNormal(Widget w)
bool IsFocusable(Widget w)
void ColorHighlight(Widget w)
proto native UAInputAPI GetUApi()
Super root of all classes in Enforce script.
Definition EnScript.c:11
static int GetEnumSize(typename e)
Return amount of values in enum.
Definition EnConvert.c:620
static const string PRESET_NEW
Definition InputUtils.c:5
static const string PRESET_OLD
Definition InputUtils.c:4
static int GetConsolePresetID()
Definition InputUtils.c:198
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition InputUtils.c:151
static void UpdateConsolePresetID()
Definition InputUtils.c:187
static const float ICON_SCALE_TOOLBAR
Definition InputUtils.c:15
void UpdateControlsElementVisibility()
override bool OnMouseEnter(Widget w, int x, int y)
override void OnShow()
void ComposeData()
Inits data structure.
override bool OnFocus(Widget w, int x, int y)
override void Update(float timeslice)
CanvasWidget m_CanvasWidget
Widget FindChildByID(Widget wid, int user_id)
Finds immediate child widget with a corresponding userID.
int FilterByVisible(array< Widget > input, array< Widget > filtered)
returns count
string m_BackButtonTextID
void ColorHighlight(Widget w)
bool IsFocusable(Widget w)
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
void ButtonSetText(Widget w, string text)
ref map< int, ref TButtonPairingInfo > m_AreasLR
ImageWidget m_ControlsLayoutImage
override bool OnFocusLost(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
void DrawConnectingLines(int index)
void UpdateTabContent(int tab_index)
ref map< int, Widget > m_ImageMarkerStructure
void UpdateControlsElements()
ref map< int, Widget > m_CategoryStructure
void ButtonSetTextColor(Widget w, int color)
ButtonWidget m_Back
override Widget Init()
override bool OnClick(Widget w, int x, int y, int button)
void ButtonSetColor(Widget w, int color)
bool FindAllChildrenByID(Widget wid, int user_id, out array< Widget > results)
Finds all immediate children widgets with corresponding userIDs.
void ColorNormal(Widget w)
void OnInputPresetChanged()
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
MouseState
Definition EnSystem.c:311
proto native void SetFocus(Widget w)
proto native bool IsVisible()
EInputDeviceType
Definition input.c:3
int ARGB(int a, int r, int g, int b)
Definition proto.c:322