Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
tutorialsmenu.c
Go to the documentation of this file.
1class TutorialsMenu extends UIScriptedMenu
2{
3 protected const string PATH_MOUSEKEY = "scripts/data/pagedatatutorials.json";
4 protected const string PATH_MOUSEKEY_720P = "scripts/data/pagedatatutorials_720p.json";
5 protected const string PATH_X1_OLD = "xbox/pagedatatutorials.json";
6 protected const string PATH_X1_OLD_720P = "xbox/pagedatatutorials_720p.json";
7 protected const string PATH_X1_NEW = "xbox/pagedatatutorialsalternate.json";
8 protected const string PATH_X1_NEW_720p = "xbox/pagedatatutorialsalternate_720p.json";
9 protected const string PATH_PS_OLD = "ps4/pagedatatutorials.json";
10 protected const string PATH_PS_NEW = "ps4/pagedatatutorialsalternate.json";
11
12 protected const float MIN_LINE_SCALE = 1.0;
13 protected const float MAX_LINE_SCALE = 1.5;
14 protected const float WITDH_SCALE_RES = 1920.0;
15 protected const float HEIGHT_SCALE_RES = 1080.0;
16 protected const float LINE_THICKNESS_BASE = 2.0;
17 protected const float BRANCH_OFFSET_BASE = 50.0;
18
19 protected const int EXACT_TEXT_SIZE_LOW_RES = 32;
20
21 protected string m_BackButtonTextID;
22
25 protected ButtonWidget m_Back;
26
27 protected ImageWidget m_ControlsLayoutImage;
28 protected const int TABS_COUNT = 4;
29 protected ImageWidget m_tab_images[TABS_COUNT];
30 protected TabberUI m_TabScript;
31 //protected ref TutorialKeybinds m_KeybindsTab;
32 protected int m_CurrentTabIndex = 0;
33 protected Input m_Input;
34
35 protected bool m_LowResTutorialMode;
36
38 {
39 m_Input = g_Game.GetInput();
40 }
41
42 //============================================
43 // Init
44 //============================================
45 override Widget Init()
46 {
48
49 #ifdef PLATFORM_CONSOLE
51 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/tutorials/xbox/tutorials_720p.layout");
52 else
53 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/tutorials/xbox/tutorials.layout");
54 #else
56 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/tutorials/pc/tutorials_720p.layout");
57 else
58 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/new_ui/tutorials/pc/tutorials.layout");
59 #endif
60
61 m_InfoTextLeft = layoutRoot.FindAnyWidget("InfoTextLeft");
62 m_InfoTextRight = layoutRoot.FindAnyWidget("InfoTextRight");
63
64 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget("back"));
65
66 layoutRoot.FindAnyWidget("Tabber").GetScript(m_TabScript);
67 m_TabScript.m_OnTabSwitch.Insert(DrawConnectingLines);
68
71 /*#ifdef PLATFORM_CONSOLE
72 if (m_Input.IsEnabledMouseAndKeyboard())
73 {
74 m_KeybindsTab = new TutorialKeybinds(layoutRoot.FindAnyWidget("Tab_6"), this);
75 m_TabScript.EnableTabControl(6, true);
76 }
77 #endif*/
78
79 m_tab_images[0] = ImageWidget.Cast(layoutRoot.FindAnyWidget("MovementTabBackdropImageWidget"));
80 m_tab_images[1] = ImageWidget.Cast(layoutRoot.FindAnyWidget("WeaponsAndActionsBackdropImageWidget"));
81 m_tab_images[2] = ImageWidget.Cast(layoutRoot.FindAnyWidget("InventoryTabBackdropImageWidget"));
82 m_tab_images[3] = ImageWidget.Cast(layoutRoot.FindAnyWidget("MenusTabBackdropImageWidget"));
83
86
87 PPERequesterBank.GetRequester(PPERequester_TutorialMenu).Start(new Param1<float>(0.6));
89
90 g_Game.GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
91 g_Game.GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
92
93 return layoutRoot;
94 }
95
97 {
98 m_TabScript.m_OnTabSwitch.Remove(DrawConnectingLines);
99 PPERequesterBank.GetRequester(PPERequester_TutorialMenu).Stop();
100 }
101
102 protected bool IsLowResTutorialMode()
103 {
104 int screenW, screenH;
105 GetScreenSize(screenW, screenH);
106 return screenW <= 1280 || screenH <= 720;
107 }
108
109 protected float GetTutorialLineScale()
110 {
111 int screenW, screenH;
112 GetScreenSize(screenW, screenH);
113
114 if (screenW <= 0 || screenH <= 0)
115 return MIN_LINE_SCALE;
116
117 float widthScale = WITDH_SCALE_RES / screenW;
118 float heightScale = HEIGHT_SCALE_RES / screenH;
119 float scale = Math.Max(widthScale, heightScale);
120 scale = Math.Clamp(scale, MIN_LINE_SCALE, MAX_LINE_SCALE);
121
122 return scale;
123 }
124
125 protected float GetTutorialLineThickness()
126 {
128 }
129
130 protected float GetTutorialBranchOffset()
131 {
133 }
134
135 protected void OnInputPresetChanged()
136 {
137 #ifdef PLATFORM_CONSOLE
139 /*if (m_KeybindsTab)
140 {
141 m_KeybindsTab.Rebuild();
142 }*/
143 #endif
144 }
145
152
153 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
154 {
155 bool mk = m_Input.IsEnabledMouseAndKeyboard();
156 bool mkServer = m_Input.IsEnabledMouseAndKeyboardEvenOnServer();
157
158 switch (pInputDeviceType)
159 {
160 case EInputDeviceType.CONTROLLER:
161 if (mk && mkServer)
162 {
163 g_Game.GetUIManager().ShowUICursor(false);
164 }
165 break;
166
167 default:
168 if (mk && mkServer)
169 {
170 g_Game.GetUIManager().ShowUICursor(true);
171 }
172 break;
173 }
174
176 /*if (m_KeybindsTab)
177 {
178 m_KeybindsTab.Rebuild();
179 }*/
180 }
181
182 override void OnShow()
183 {
184 super.OnShow();
185
186 SetFocus(null);
187 OnInputDeviceChanged(m_Input.GetCurrentInputDevice());
188 }
189
190 void Back()
191 {
192 g_Game.GetUIManager().Back();
193 }
194
195 void DrawConnectingLines(int index)
196 {
197 m_CurrentTabIndex = index;
198
199 if (index == 6)
200 {
201 m_InfoTextLeft.Show(false);
202 m_InfoTextRight.Show(false);
203 }
204 else
205 {
206 m_InfoTextLeft.Show(true);
207 m_InfoTextRight.Show(true);
210
211 map<string, ref array<int>> buttonMarkerGroupsUnfiltered = new map<string, ref array<int>>;
213
214 float textWidgetPosX, textWidgetPosY;
215 float textWidgetWidth, textWidgetHeight;
216 float dotPosX, dotPosY;
217 float dotWidth, dotHeight;
218 float drawPosX, drawPosY;
219 float lineThickness;
220 float branchOffset;
221
222 CanvasWidget canvasWidget = CanvasWidget.Cast(layoutRoot.FindAnyWidget("CanvasWidget_" + index));
223 canvasWidget.Clear();
224 lineThickness = GetTutorialLineThickness();
225 branchOffset = GetTutorialBranchOffset();
226 controlMappingInfo = GetControlMappingInfo();
227
228 for (int i = 0; i < m_TabScript.GetTabCount(); i++)
229 {
230 tabArray.Insert(new array<ref JsonControlMappingInfo>);
231 for (int j = 0; j < 30; j++)
232 {
233 tabArray[i].Insert(NULL);
234 }
235 }
236
237 // insert json info to array by index, so it is sorted
238 int controlMappingInfoCount = controlMappingInfo.Count();
239 for (i = 0; i < controlMappingInfoCount; i++)
240 {
241 JsonControlMappingInfo info = controlMappingInfo.Get(i);
242 tabArray[info.m_TabID][info.m_TextWidgetID] = info;
243 }
244
245 // create group of buttons which are connected together with line
246 for (int l = 0; l < controlMappingInfoCount; l++)
247 {
248 JsonControlMappingInfo info1 = controlMappingInfo[l];
249 string buttonName = info1.m_ButtonName;
250 int textWidgetID = info1.m_TextWidgetID;
251 if (info1.m_TabID != index)
252 {
253 continue;
254 }
255 if (!buttonMarkerGroupsUnfiltered.Contains(buttonName))
256 {
257 buttonMarkerGroupsUnfiltered.Insert(buttonName, new array<int>);
258 buttonMarkerGroupsUnfiltered.Get(buttonName).Insert(textWidgetID);
259 }
260 else
261 {
262 buttonMarkerGroupsUnfiltered.Get(buttonName).Insert(textWidgetID);
263 }
264 }
265
266 // we want groups which are bigger than 1
267 for (l = 0; l < buttonMarkerGroupsUnfiltered.Count(); l++)
268 {
269 if (buttonMarkerGroupsUnfiltered.GetElement(l).Count() > 1)
270 {
271 string key = buttonMarkerGroupsUnfiltered.GetKey(l);
272 buttonMarkerGroups.Insert(buttonMarkerGroupsUnfiltered.GetKey(l), buttonMarkerGroupsUnfiltered.Get(key));
273 }
274 }
275
276 // hide all button markers
277 Widget xboxControlsImage = layoutRoot.FindAnyWidget("Markers_" + index);
278
279 Widget panelWidget;
280 Widget buttonMarkerWidget;
281
282 for (l = 0; l < tabArray[index].Count(); l++)
283 {
284 panelWidget = layoutRoot.FindAnyWidget("PanelWidget" + l);
285 if (tabArray[index][l] != NULL)
286 {
287 RichTextWidget textWidget = RichTextWidget.Cast(panelWidget.FindAnyWidget("TextWidget" + l));
288 buttonMarkerWidget = layoutRoot.FindAnyWidget("button_marker_" + tabArray[index][l].m_ButtonName);
289
291 textWidget.SetTextExactSize(EXACT_TEXT_SIZE_LOW_RES);
292
293 textWidget.SetText(tabArray[index][l].m_InfoText);
294
295 panelWidget.Show(true);
296 panelWidget.Update();
297
298 if (!buttonMarkerGroups.Contains(tabArray[index][l].m_ButtonName))
299 {
300 panelWidget.GetScreenPos(textWidgetPosX, textWidgetPosY);
301 panelWidget.GetScreenSize(textWidgetWidth,textWidgetHeight);
302
303 buttonMarkerWidget.GetScreenPos(dotPosX, dotPosY);
304 buttonMarkerWidget.GetScreenSize(dotWidth, dotHeight);
305
306 drawPosY = textWidgetPosY + textWidgetHeight / 2;
307
308 if (l < 15)
309 {
310 drawPosX = textWidgetPosX + textWidgetWidth - 1;
311 }
312 else
313 {
314 drawPosX = textWidgetPosX;
315 }
316
317 canvasWidget.DrawLine(drawPosX, drawPosY, dotPosX + dotWidth / 2, drawPosY, lineThickness, ARGBF(0.6, 1, 1, 1));
318 canvasWidget.DrawLine(dotPosX + dotWidth / 2, drawPosY, dotPosX + dotWidth / 2, dotPosY + dotHeight / 2, lineThickness, ARGBF(0.6, 1, 1, 1));
319 }
320 }
321 else
322 {
323 panelWidget.Show(false);
324 }
325 panelWidget.Update();
326 }
327
328 // draw connecting lines
329 for (l = 0; l < buttonMarkerGroups.Count(); l++)
330 {
331 textWidgetPosX = 0;
332 textWidgetPosY = 0;
333 textWidgetWidth = 0;
334 textWidgetHeight = 0;
335 float groupPointX = 0, groupPointY = 0;
336 float firstX = 0, firstY = 0;
337
338 array<int> element = buttonMarkerGroups.GetElement(l);
339 string keyName = buttonMarkerGroups.GetKey(l);
340 buttonMarkerWidget = layoutRoot.FindAnyWidget("button_marker_" + keyName);
341
342 int elementsCount = element.Count();
343 for (int g = 0; g < elementsCount; g++)
344 {
345 panelWidget = layoutRoot.FindAnyWidget("PanelWidget" + element[g]);
346
347 panelWidget.GetScreenPos(textWidgetPosX, textWidgetPosY);
348 panelWidget.GetScreenSize(textWidgetWidth, textWidgetHeight);
349
350 if (g == 0)
351 {
352 if (element[0] < 15)
353 {
354 firstX = textWidgetPosX + textWidgetWidth + branchOffset;
355 }
356 else
357 {
358 firstX = textWidgetPosX - branchOffset;
359 }
360 firstY = textWidgetPosY + textWidgetHeight/2;
361
362 }
363
364 groupPointX += textWidgetPosX;
365 groupPointY += textWidgetPosY;
366
367 if (element[0] < 15)
368 {
369 canvasWidget.DrawLine(textWidgetPosX + textWidgetWidth - 1, textWidgetPosY + textWidgetHeight / 2, textWidgetPosX + textWidgetWidth + branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness, ARGBF(0.6, 1, 1, 1));
370 }
371 else
372 {
373 canvasWidget.DrawLine(textWidgetPosX, textWidgetPosY + textWidgetHeight / 2, textWidgetPosX - branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness, ARGBF(0.6, 1, 1, 1));
374 }
375 }
376
377 if (element[0] < 15)
378 {
379 groupPointX = groupPointX / elementsCount + textWidgetWidth + branchOffset;
380 }
381 else
382 {
383 groupPointX = groupPointX / elementsCount - branchOffset;
384 }
385
386 groupPointY = groupPointY/elementsCount + textWidgetHeight/2;
387
388 buttonMarkerWidget.GetScreenPos(dotPosX, dotPosY);
389 buttonMarkerWidget.GetScreenSize(dotWidth, dotHeight);
390
391 canvasWidget.DrawLine(groupPointX, groupPointY, dotPosX + dotWidth / 2, groupPointY, lineThickness, ARGBF(0.6, 1, 1, 1));
392 canvasWidget.DrawLine(dotPosX + dotWidth / 2, groupPointY, dotPosX + dotWidth / 2, dotPosY, lineThickness, ARGBF(0.6, 1, 1, 1));
393
394 if (element[0] < 15)
395 {
396 canvasWidget.DrawLine(firstX, firstY, textWidgetPosX + textWidgetWidth + branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness, ARGBF(0.6, 1, 1, 1));
397 }
398 else
399 {
400 canvasWidget.DrawLine(firstX, firstY, textWidgetPosX - branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness, ARGBF(0.6, 1, 1, 1));
401 }
402 }
403 }
404 }
405
407 {
409 string filePath;
410
413 filePath = PATH_MOUSEKEY;
414 else
415 filePath = PATH_MOUSEKEY_720P;
416
417 string profileName = "";
418 m_Input.GetProfileName(m_Input.GetCurrentProfile(), profileName);
419
420 #ifdef PLATFORM_CONSOLE
421 bool controllerActive = m_Input.GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
422 if (controllerActive)
423 {
424 if (profileName == "#STR_UAPRESET_0" || profileName == "#STR_USER")
425 {
426 #ifdef PLATFORM_MSSTORE
428 filePath = PATH_X1_OLD;
429 else
430 filePath = PATH_X1_OLD_720P;
431 #endif
432 #ifdef PLATFORM_XBOX
434 filePath = PATH_X1_OLD;
435 else
436 filePath = PATH_X1_OLD_720P;
437 #endif
438 #ifdef PLATFORM_PS4
439 filePath = PATH_PS_OLD;
440 #endif
441 }
442 else if (profileName == "#STR_UAPRESET_1")
443 {
444 #ifdef PLATFORM_MSSTORE
446 filePath = PATH_X1_NEW;
447 else
448 filePath = PATH_X1_NEW_720p;
449 #endif
450 #ifdef PLATFORM_XBOX
452 filePath = PATH_X1_NEW;
453 else
454 filePath = PATH_X1_NEW_720p;
455 #endif
456 #ifdef PLATFORM_PS4
457 filePath = PATH_PS_NEW;
458 #endif
459 }
460 else
461 {
462 ErrorEx("Invalid file path!");
463 filePath = "";
464 }
465 }
466 #endif
467 FileHandle file_handle = OpenFile(filePath, FileMode.READ);
469
470 string js_error = "";
471 string line_content = "";
472 string content = "";
473 if (file_handle)
474 {
475 while (FGets(file_handle, line_content) >= 0)
476 {
477 content += line_content;
478 }
479 CloseFile(file_handle);
480
481 if (js.ReadFromString(controlMappingInfo, content, js_error))
482 {
483 return controlMappingInfo;
484 }
485 else
486 {
487 ErrorEx("JSON ERROR => [TutorialsMenu]: " + js_error);
488 }
489 }
490 else
491 {
492 ErrorEx("FILEHANDLE ERROR => [TutorialsMenu]: " + js_error);
493 }
494
495 return controlMappingInfo;
496 }
497
498 override void Update(float timeslice)
499 {
500 if (GetUApi().GetInputByID(UAUITabLeft).LocalPress())
501 {
502 m_TabScript.PreviousTab();
503 }
504
505 //RIGHT BUMPER - TAB RIGHT
506 if (GetUApi().GetInputByID(UAUITabRight).LocalPress())
507 {
508 m_TabScript.NextTab();
509 }
510
511 if (GetUApi().GetInputByID(UAUIBack).LocalPress())
512 {
513 Back();
514 }
515 }
516
518 protected void LoadFooterButtonTexts()
519 {
520 TextWidget uiBackText = TextWidget.Cast(layoutRoot.FindAnyWidget("BackText"));
521
522 if (uiBackText)
523 {
524 uiBackText.SetText(m_BackButtonTextID);
525 }
526 }
527
528 protected void LoadTextStrings()
529 {
530 #ifdef PLATFORM_PS4
531 m_BackButtonTextID = "ps4_ingame_menu_back";
532 #else
533 m_BackButtonTextID = "STR_rootFrame_toolbar_bg_ConsoleToolbar_Back_BackText0";
534 #endif
535 }
536
537 override bool OnClick(Widget w, int x, int y, int button)
538 {
539 if (button == MouseState.LEFT)
540 {
541 if (w == m_Back)
542 {
543 Back();
544 return true;
545 }
546 }
547 return false;
548 }
549
550 override bool OnMouseEnter(Widget w, int x, int y)
551 {
552 if (IsFocusable(w))
553 {
555 return true;
556 }
557 return false;
558 }
559
560 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
561 {
562 if (IsFocusable(w))
563 {
564 ColorNormal(w);
565 return true;
566 }
567 return false;
568 }
569
570 override bool OnFocus(Widget w, int x, int y)
571 {
572 if (IsFocusable(w))
573 {
575 return true;
576 }
577 return false;
578 }
579
580 override bool OnFocusLost(Widget w, int x, int y)
581 {
582 if (IsFocusable(w))
583 {
584 ColorNormal(w);
585 return true;
586 }
587 return false;
588 }
589
591 {
592 return (w && w == m_Back);
593 }
594
595 //Coloring functions (Until WidgetStyles are useful)
597 {
598 if (!w)
599 return;
600
601 int color_pnl = ARGB(255, 0, 0, 0);
602 int color_lbl = ARGB(255, 255, 0, 0);
603 int color_img = ARGB(255, 200, 0, 0);
604
605 #ifdef PLATFORM_CONSOLE
606 color_pnl = ARGB(255, 200, 0, 0);
607 color_lbl = ARGB(255, 255, 255, 255);
608 #endif
609
610 ButtonSetColor(w, color_pnl);
611 ButtonSetTextColor(w, color_lbl);
612 ImagenSetColor(w, color_img);
613 }
614
616 {
617 if (!w)
618 return;
619
620 int color_pnl = ARGB(0, 0, 0, 0);
621 int color_lbl = ARGB(255, 255, 255, 255);
622 int color_img = ARGB(255, 255, 255, 255);
623
624 ButtonSetColor(w, color_pnl);
625 ButtonSetTextColor(w, color_lbl);
626 ImagenSetColor(w, color_img);
627 }
628
629 void ButtonSetText(Widget w, string text)
630 {
631 if (!w)
632 return;
633
634 TextWidget label = TextWidget.Cast(w.FindWidget(w.GetName() + "_label"));
635
636 if (label)
637 {
638 label.SetText(text);
639 }
640
641 }
642
643 void ButtonSetColor(Widget w, int color)
644 {
645 if (!w)
646 return;
647
648 Widget panel = w.FindWidget(w.GetName() + "_panel");
649
650 if (panel)
651 {
652 panel.SetColor(color);
653 }
654 }
655
656 void ImagenSetColor(Widget w, int color)
657 {
658 if (!w)
659 return;
660
661 Widget panel = w.FindWidget(w.GetName() + "_image");
662
663 if (panel)
664 {
665 panel.SetColor(color);
666 }
667 }
668
669 void ButtonSetTextColor(Widget w, int color)
670 {
671 if (!w)
672 return;
673
674 TextWidget label = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_label"));
675 TextWidget text = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text"));
676 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text_1"));
677
678 if (label)
679 {
680 label.SetColor(color);
681 }
682
683 if (text)
684 {
685 text.SetColor(color);
686 }
687
688 if (text2)
689 {
690 text2.SetColor(color);
691 }
692 }
693
694 protected void UpdateControlsElements()
695 {
696 #ifdef PLATFORM_CONSOLE
697 RichTextWidget toolbar_text = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ContextToolbarText"));
698 if (toolbar_text)
699 {
700 string text = string.Format(" %1",InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "#STR_settings_menu_root_toolbar_bg_ConsoleToolbar_Back_BackText0", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
701 toolbar_text.SetText(text);
702 }
703 #endif
704 }
705
707 {
708 bool toolbarShow = false;
709 #ifdef PLATFORM_CONSOLE
710 toolbarShow = !m_Input.IsEnabledMouseAndKeyboardEvenOnServer() || m_Input.GetCurrentInputDevice() == EInputDeviceType.CONTROLLER;
711 #endif
712
713 #ifdef PLATFORM_CONSOLE
714 layoutRoot.FindAnyWidget("toolbar_bg").Show(toolbarShow);
715 #endif
716 layoutRoot.FindAnyWidget("play_panel_root").Show(!toolbarShow);
717 }
718}
Definition input.c:11
static const float ICON_SCALE_TOOLBAR
Definition inpututils.c:15
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition inpututils.c:167
Class for sending RPC over network.
Definition gameplay.c:50
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
Definition enmath.c:7
Xbox menu.
Definition dayzgame.c:64
void OnInputPresetChanged()
float GetTutorialLineScale()
string m_BackButtonTextID
void RefreshControlMappings()
void ButtonSetText(Widget w, string text)
void UpdateControlsElementVisibility()
override void Update(float timeslice)
const float WITDH_SCALE_RES
Widget m_InfoTextRight
const int TABS_COUNT
const string PATH_X1_OLD_720P
const float LINE_THICKNESS_BASE
override void OnShow()
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
ImageWidget m_ControlsLayoutImage
const float HEIGHT_SCALE_RES
bool m_LowResTutorialMode
void ~TutorialsMenu()
void ButtonSetColor(Widget w, int color)
bool IsLowResTutorialMode()
void DrawConnectingLines(int index)
const string PATH_MOUSEKEY
float GetTutorialLineThickness()
ButtonWidget m_Back
void ButtonSetTextColor(Widget w, int color)
float GetTutorialBranchOffset()
const string PATH_X1_OLD
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
void ColorNormal(Widget w)
void LoadTextStrings()
Set correct bottom button texts based on platform (ps4 vs xbox texts).
const string PATH_X1_NEW
ImageWidget m_tab_images[TABS_COUNT]
const float MAX_LINE_SCALE
array< ref JsonControlMappingInfo > GetControlMappingInfo()
override Widget Init()
const string PATH_MOUSEKEY_720P
void UpdateControlsElements()
override bool OnFocusLost(Widget w, int x, int y)
const float BRANCH_OFFSET_BASE
bool IsFocusable(Widget w)
override bool OnMouseEnter(Widget w, int x, int y)
Widget m_InfoTextLeft
const string PATH_X1_NEW_720p
void LoadFooterButtonTexts()
Initial texts load for the footer buttons.
void ImagenSetColor(Widget w, int color)
Definition mainmenu.c:666
void ColorHighlight(Widget w)
override bool OnFocus(Widget w, int x, int y)
override bool OnClick(Widget w, int x, int y, int button)
const int EXACT_TEXT_SIZE_LOW_RES
const string PATH_PS_NEW
const float MIN_LINE_SCALE
const string PATH_PS_OLD
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZGame g_Game
Definition dayzgame.c:3942
enum ShapeType ErrorEx
FileMode
Definition ensystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Definition ensystem.c:390
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
MouseState
Definition ensystem.c:311
proto void GetScreenSize(out int x, out int y)
proto native void SetFocus(Widget w)
proto native void DrawLine(float x1, float y1, float x2, float y2, float width, int color)
Icon x
Icon y
EInputDeviceType
Definition input.c:3
int ARGB(int a, int r, int g, int b)
Definition proto.c:322
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Definition proto.c:332
proto native UAInputAPI GetUApi()