DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
InGameMenuXbox.c
Go to the documentation of this file.
1class InGameMenuXbox extends UIScriptedMenu
2{
3//#ifdef PLATFORM_CONSOLE
4
5 // Widgets texts id
6 protected string m_MuteButtonTextID;
7 protected string m_UnmuteButtonTextID;
8 protected string m_BackButtonTextID;
9 protected string m_SelectButtonTextID;
11 protected string m_CurrentMuteButtonText;
12
13 protected bool m_SelectAvailable;
14 protected bool m_MuteAvailable;
15 protected bool m_BackAvailable;
16 protected bool m_GamercardAvailable;
17
18 protected bool m_PlayerAlive;
19
20 protected ref PlayerListScriptedWidget m_ServerInfoPanel;
21
23
24 protected ButtonWidget m_ContinueButton;
25 protected ButtonWidget m_ExitButton;
26 protected ButtonWidget m_RestartDeadButton;
27 protected ButtonWidget m_RestartButton;
28 protected ButtonWidget m_OptionsButton;
29 protected ButtonWidget m_ControlsButton;
30 protected ButtonWidget m_OnlineButton;
31 protected ButtonWidget m_TutorialsButton;
32
34
35 const int BUTTON_XBOX_CONTROLS = 201;
36
38 {
41 }
42
44 {
45 ClientData.SyncEvent_OnPlayerListUpdate.Remove(SyncEvent_OnRecievedPlayerList);
47
49 if (mission)
50 {
51 IngameHud hud = IngameHud.Cast(mission.GetHud());
52 if (hud)
53 {
54 hud.ShowHudUI(true);
55 hud.ShowQuickbarUI(true);
56 }
57
59 }
60
61 PPERequesterBank.GetRequester(PPERequester_MenuEffects).Stop();
62 }
63
64 protected void OnInputPresetChanged()
65 {
66 #ifdef PLATFORM_CONSOLE
68 #endif
69 }
70
71 protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
72 {
74 }
75
76 override Widget Init()
77 {
78 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/xbox/day_z_ingamemenu_xbox.layout");
79
80 m_OnlineMenu = GetGame().GetWorkspace().CreateWidgets("gui/layouts/xbox/ingamemenu_xbox/online_info_menu.layout", layoutRoot);
81 m_OnlineMenu.Show(false);
82
83 m_ContinueButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("continuebtn"));
84 m_RestartDeadButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("restartbtn_dead"));
85 m_ExitButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("exitbtn"));
86 m_RestartButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("restartbtn"));
87 m_OptionsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("optionsbtn"));
88 m_ControlsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("controlsbtn"));
89 m_OnlineButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("onlinebtn"));
90 m_TutorialsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("tutorialsbtn"));
91 m_Version = TextWidget.Cast(layoutRoot.FindAnyWidget("version"));
92
93 m_SelectAvailable = true;
94 m_MuteAvailable = false;
95 m_GamercardAvailable = false;
96 m_BackAvailable = true;
97
98 Man player = GetGame().GetPlayer();
99 if (player)
100 {
101 int life_state = player.GetPlayerState();
102
103 if (life_state == EPlayerStates.ALIVE)
104 {
105 m_PlayerAlive = true;
106 }
107 }
108
110
111 string version;
112 GetGame().GetVersion(version);
113 #ifdef PLATFORM_CONSOLE
114 version = "#main_menu_version" + " " + version + " (" + g_Game.GetDatabaseID() + ")";
115 #else
116 version = "#main_menu_version" + " " + version;
117 #endif
118 m_Version.SetText(version);
119
120 if (GetGame().IsMultiplayer())
121 {
122 m_OnlineButton.Show(true);
123
124 TextWidget w_text = TextWidget.Cast(m_OnlineMenu.FindAnyWidget("OnlineTextWidget"));
125 w_text.SetText(g_Game.GetHostName());
126
127 m_ServerInfoPanel = new PlayerListScriptedWidget(m_OnlineMenu.FindAnyWidget("ServerInfoPanel"));
128
130 ClientData.SyncEvent_OnPlayerListUpdate.Insert(SyncEvent_OnRecievedPlayerList);
131
132 m_ServerInfoPanel.Reload(ClientData.m_PlayerList);
133 m_ServerInfoPanel.ReloadLocal(OnlineServices.GetMuteList());
134
135 string uid = m_ServerInfoPanel.FindPlayerByWidget(GetFocus());
136 if (uid != "")
137 {
138 if (IsLocalPlayer(uid) || m_ServerInfoPanel.IsEmpty())
139 {
140 m_MuteAvailable = false;
141 m_GamercardAvailable = false;
142 }
143 else
144 {
145 m_MuteAvailable = !GetGame().GetWorld().IsDisabledReceivingVoN();
146 #ifndef PLATFORM_PS4
147 m_GamercardAvailable = true;
148 #endif
150 }
151
152 if (m_ServerInfoPanel.IsGloballyMuted(uid))
153 {
154 m_MuteAvailable = false;
155 }
156 }
157 }
158 else
159 {
160 layoutRoot.FindAnyWidget("onlinebtn").Show(false);
161 layoutRoot.FindAnyWidget("invitebtn").Show(false);
162 }
163
164 //RESPAWN & RESTART
165 ButtonWidget restart_btn = ButtonWidget.Cast(layoutRoot.FindAnyWidgetById(IDC_INT_RETRY));
166 if (GetGame().IsMultiplayer())
167 {
168 restart_btn.SetText("#main_menu_respawn");
169 }
170 else
171 {
172 restart_btn.SetText("#main_menu_restart");
173 }
174
175 if (GetGame().IsMultiplayer() && !(GetGame().CanRespawnPlayer() || (player && player.IsUnconscious())))
176 {
177 restart_btn.Enable(false);
178 restart_btn.Show(false);
179 }
180 //
181
182 #ifdef BULDOZER
183 delete restart_btn;
184 #endif
185
187 if (mission)
188 {
189 IngameHud hud = IngameHud.Cast(mission.GetHud());
190 if (hud)
191 {
192 hud.ShowHudUI(false);
193 hud.ShowQuickbarUI(false);
194 }
195
196 mission.Pause();
197 }
198
199 PPERequester_MenuEffects requester;
200 Class.CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
201 requester.SetVignetteIntensity(0.6);
202
206
207 OnInputDeviceChanged(GetGame().GetInput().GetCurrentInputDevice());
208
209 return layoutRoot;
210 }
211
212 override bool OnClick(Widget w, int x, int y, int button)
213 {
214 super.OnClick(w, x, y, button);
215
216 switch (w.GetUserID())
217 {
219 {
221 return true;
222 }
223 case IDC_MAIN_OPTIONS:
224 {
225 EnterScriptedMenu(MENU_OPTIONS);
226 return true;
227 }
229 {
230 EnterScriptedMenu(MENU_XBOX_CONTROLS);
231 return true;
232 }
233 case IDC_MAIN_QUIT:
234 {
235 GetGame().GetUIManager().ShowDialog("#main_menu_exit", "#main_menu_exit_desc", IDC_INT_EXIT, DBT_YESNO, DBB_YES, DMT_QUESTION, NULL);
236 return true;
237 }
238 case IDC_INT_RETRY:
239 {
240 if (!GetGame().IsMultiplayer())
241 {
242 GetGame().GetUIManager().ShowDialog("#main_menu_restart", "Are you sure you want to restart?", IDC_INT_RETRY, DBT_YESNO, DBB_YES, DMT_QUESTION, this);
243 }
244 else
245 {
246 GetGame().GetUIManager().ShowDialog("#main_menu_respawn", "#main_menu_respawn_question", IDC_INT_RETRY, DBT_YESNO, DBB_YES, DMT_QUESTION, this);
247 }
248 return true;
249 }
250 case IDC_MAIN_ONLINE:
251 {
252 m_OnlineMenu.Show(true);
253 m_SelectAvailable = false;
254
256 m_ServerInfoPanel.FocusFirst();
257 return true;
258 }
259 case 117:
260 {
261 EnterScriptedMenu(MENU_TUTORIAL);
262 return true;
263 }
264 case IDC_MULTI_INVITE:
265 {
267 return true;
268 }
269 }
270
271 if (w == layoutRoot.FindAnyWidget("backbtn"))
272 {
273 CloseOnline();
274 }
275 else if (w == m_RestartDeadButton)
276 {
277 if (GetGame().GetMission().GetRespawnModeClient() == GameConstants.RESPAWN_MODE_CUSTOM)
278 {
279 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(GetGame().GetUIManager().EnterScriptedMenu,MENU_RESPAWN_DIALOGUE,this);
280 }
281 else
282 {
283 GameRetry(true);
284 }
285 return true;
286 }
287
288 return false;
289 }
290
291 override bool OnModalResult(Widget w, int x, int y, int code, int result)
292 {
293 super.OnModalResult(w, x, y, code, result);
294
295 if (code == IDC_INT_EXIT && result == DBB_YES)
296 {
297 if (GetGame().IsMultiplayer())
298 {
300 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(GetGame().GetMission().CreateLogoutMenu, this);
301 }
302 else
303 {
304 // skip logout screen in singleplayer
306 }
307 g_Game.CancelLoginTimeCountdown();
308
309 return true;
310
311 }
312 else if (code == IDC_INT_EXIT && result == DBB_NO)
313 {
314 g_Game.CancelLoginTimeCountdown();
315 }
316 else if (code == IDC_INT_RETRY)
317 {
318 if (result == DBB_YES)
319 {
320 if (GetGame().GetMission().GetRespawnModeClient() == GameConstants.RESPAWN_MODE_CUSTOM)
321 {
322 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(GetGame().GetUIManager().EnterScriptedMenu,MENU_RESPAWN_DIALOGUE,this);
323 }
324 else
325 {
326 GameRetry(true);
327 return true;
328 }
329 }
330 else
331 {
333 }
334 }
335
336 return false;
337 }
338
339 void GameRetry(bool random)
340 {
341 if (GetGame().IsMultiplayer())
342 {
346
347 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
348 if (player)
349 {
350 player.SimulateDeath(true);
351 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(player.ShowDeadScreen, true, 0);
352 }
353
354 MissionGameplay missionGP = MissionGameplay.Cast(GetGame().GetMission());
355 missionGP.DestroyAllMenus();
356 missionGP.SetPlayerRespawning(true);
357 missionGP.Continue();
358
359 Close();
360 }
361 else
363 }
364
365 void MenuRequestRespawn(UIScriptedMenu menu, bool random)
366 {
367 if (RespawnDialogue.Cast(menu))
368 GameRetry(random);
369 }
370
371 bool IsLocalPlayer(string uid)
372 {
373 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
374 string local_uid;
375 if (GetGame().GetUserManager())
376 local_uid = GetGame().GetUserManager().GetSelectedUser().GetUid();
377 return (uid == local_uid);
378 }
379
381 {
382 SyncPlayerList player_list = new SyncPlayerList;
383 player_list.m_PlayerList = new array<ref SyncPlayer>;
384 for (int i = 0; i < player_count; i++)
385 {
386 SyncPlayer sync_player = new SyncPlayer;
387 sync_player.m_UID = "uid" + i;
388 sync_player.m_PlayerName = "Player " + i;
389 player_list.m_PlayerList.Insert(sync_player);
390 }
391 return player_list;
392 }
393
394 override void Update(float timeslice)
395 {
396 UpdateGUI();
397
398 if (GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget("OnlineInfo").IsVisible())
399 {
400 PlayerListEntryScriptedWidget selected;
401 if (m_ServerInfoPanel)
402 selected = m_ServerInfoPanel.GetSelectedPlayer();
403 if (GetUApi().GetInputByID(UAUICtrlX).LocalPress())
404 {
405 if (selected)
406 m_ServerInfoPanel.ToggleMute(selected.GetUID());
407 Refresh();
408 }
409
410 #ifndef PLATFORM_PS4
411 if (GetUApi().GetInputByID(UAUICtrlY).LocalPress())
412 {
413 if (selected)
414 OnlineServices.ShowUserProfile(selected.GetUID());
415 }
416 #endif
417 }
418 }
419
421 {
422 Man player = GetGame().GetPlayer();
423 if (player)
424 {
425 int life_state = player.GetPlayerState();
426 m_PlayerAlive = life_state == EPlayerStates.ALIVE;
427 }
428
429 if (m_PlayerAlive)
430 {
431 m_RestartButton.Show(player.IsUnconscious());
432 }
433 else
434 {
435 m_RestartButton.Show(false);
436 }
437
438 m_ContinueButton.Show(m_PlayerAlive);
439 m_RestartDeadButton.Show(!m_PlayerAlive);
440 }
441
443 {
444 return m_OnlineMenu.IsVisible();
445 }
446
448 {
449 m_OnlineMenu.Show(false);
450 m_SelectAvailable = true;
451 m_MuteAvailable = false;
452 m_GamercardAvailable = false;
454
455 SetFocus(m_OnlineButton);
456 }
457
459 {
460 if (m_ServerInfoPanel)
461 {
462 m_ServerInfoPanel.FocusFirst();
463
464 Refresh();
465 }
466 }
467
468 override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
469 {
470 return false;
471 }
472
474 {
475 m_ServerInfoPanel.Reload(player_list);
476
477 Refresh();
478 }
479
481 {
482 m_ServerInfoPanel.Reload(result_list);
483
484 Refresh();
485 }
486
487 override void OnShow()
488 {
489 super.OnShow();
490 Man player = GetGame().GetPlayer();
491 if (player)
492 {
493 int life_state = player.GetPlayerState();
494
495 if (life_state == EPlayerStates.ALIVE)
496 {
497 m_PlayerAlive = true;
498 }
499 }
500
501 if (m_PlayerAlive)
502 {
503 m_RestartButton.Show(player.IsUnconscious());
504 }
505 else
506 {
507 m_RestartButton.Show(false);
508 }
509 m_ContinueButton.Show(m_PlayerAlive);
510 m_RestartDeadButton.Show(!m_PlayerAlive);
511
513
514 #ifdef PLATFORM_CONSOLE
517 TextWidget warning = TextWidget.Cast(layoutRoot.FindAnyWidget("MouseAndKeyboardWarning"));
518 if (mk)
519 {
520 if (mk_server)
521 {
522 warning.SetText("#str_mouse_and_keyboard_server_warning");
523 }
524 else
525 {
526 warning.SetText("#str_controller_server_warning");
527 }
528 }
529
530 warning.Show(mk);
531 #endif
533 }
534
535 override bool OnMouseEnter(Widget w, int x, int y)
536 {
537 if (IsFocusable(w))
538 {
540 return true;
541 }
542 return false;
543 }
544
545 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
546 {
547 if (IsFocusable(w))
548 {
549 ColorNormal(w);
550 return true;
551 }
552 return false;
553 }
554
555 override bool OnFocus(Widget w, int x, int y)
556 {
557 if (IsFocusable(w))
558 {
560 return true;
561 }
562 return false;
563 }
564
565 override bool OnFocusLost(Widget w, int x, int y)
566 {
567 if (IsFocusable(w))
568 {
569 ColorNormal(w);
570 return true;
571 }
572 return false;
573 }
574
576 {
577 if (w)
578 {
579 if (w == m_ContinueButton || w == m_ExitButton || w == m_RestartButton || w == m_OptionsButton || w == m_ControlsButton || w == m_OnlineButton || w == m_TutorialsButton);
580 return true;
581 }
582 return false;
583 }
584
585 override void Refresh()
586 {
587 string version;
588 GetGame().GetVersion(version);
589 #ifdef PLATFORM_CONSOLE
590 version = "#main_menu_version" + " " + version + " (" + g_Game.GetDatabaseID() + ")";
591 #else
592 version = "#main_menu_version" + " " + version;
593 #endif
594 m_Version.SetText(version);
595
596 m_MuteAvailable = false;
597 m_GamercardAvailable = false;
598
599 if (GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget("OnlineInfo").IsVisible() && m_ServerInfoPanel)
600 {
601 PlayerListEntryScriptedWidget selected = m_ServerInfoPanel.GetSelectedPlayer();
602 if (selected && !selected.IsLocalPlayer())
603 {
604 m_MuteAvailable = !GetGame().GetWorld().IsDisabledReceivingVoN() && !selected.IsGloballyMuted();
605 #ifndef PLATFORM_PS4
606 m_GamercardAvailable = true;
607 #endif
608 SetMuteButtonText(selected.IsMuted());
609 }
610 }
611
613 }
614
616 {
617 #ifdef PLATFORM_WINDOWS
618 SetFocus(null);
619 #endif
620
621 ButtonWidget button = ButtonWidget.Cast(w);
622 if (button && button != m_ContinueButton)
623 {
624 button.SetTextColor(ARGB(255, 255, 255, 255));
625 }
626 ButtonSetColor(w, ARGB(0, 0, 0, 0));
627 ButtonSetTextColor(w, ARGB(60, 0, 0, 0));
628 }
629
631 {
632 if (!w)
633 return;
634
635 int color_pnl = ARGB(255, 0, 0, 0);
636 int color_lbl = ARGB(255, 255, 0, 0);
637
638 #ifdef PLATFORM_CONSOLE
639 color_pnl = ARGB(255, 200, 0, 0);
640 color_lbl = ARGB(255, 255, 255, 255);
641 #endif
642
643 ButtonSetColor(w, color_pnl);
644 ButtonSetTextColor(w, color_lbl);
645 }
646
648 {
649 if (!w)
650 return;
651
652 int color_pnl = ARGB(0, 0, 0, 0);
653 int color_lbl = ARGB(255, 255, 255, 255);
654
655 ButtonSetColor(w, color_pnl);
656 ButtonSetTextColor(w, color_lbl);
657 }
658
659 void ButtonSetText(Widget w, string text)
660 {
661 if (!w)
662 return;
663
664 TextWidget label = TextWidget.Cast(w.FindWidget(w.GetName() + "_label"));
665
666 if (label)
667 {
668 label.SetText(text);
669 }
670
671 }
672
673 void ButtonSetColor(Widget w, int color)
674 {
675 if (!w)
676 return;
677
678 Widget panel = w.FindWidget(w.GetName() + "_panel");
679
680 if (panel)
681 {
682 panel.SetColor(color);
683 }
684 }
685
686 void ButtonSetTextColor(Widget w, int color)
687 {
688 if (!w)
689 return;
690
691 TextWidget label = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_label"));
692 TextWidget text = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text"));
693 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text_1"));
694
695 if (label)
696 {
697 label.SetColor(color);
698 }
699
700 if (text)
701 {
702 text.SetColor(color);
703 }
704
705 if (text2)
706 {
707 text2.SetColor(color);
708 }
709 }
710
712 protected void SetMuteButtonText(bool isMuted)
713 {
714 if (isMuted)
715 {
716 m_CurrentMuteButtonText = m_UnmuteButtonTextID;
717 }
718 else
719 {
720 m_CurrentMuteButtonText = m_MuteButtonTextID;
721 }
722 }
723
725 protected void LoadTextStrings()
726 {
727 #ifdef PLATFORM_PS4
728 m_MuteButtonTextID = "#ps4_ingame_menu_mute";
729 m_UnmuteButtonTextID = "#ps4_ingame_menu_unmute";
730 m_BackButtonTextID = "#ps4_ingame_menu_back";
731 m_SelectButtonTextID = "#ps4_ingame_menu_select";
732 m_OpenGameCardButtonTextID = "#ps4_ingame_menu_opencard";
733 #else
734 m_MuteButtonTextID = "#xbox_ingame_menu_mute";
735 m_UnmuteButtonTextID = "#xbox_ingame_menu_unmute";
736 m_BackButtonTextID = "#STR_rootFrame_toolbar_bg_ConsoleToolbar_Back_BackText0";
737 m_SelectButtonTextID = "#layout_xbox_ingame_menu_select";
738 m_OpenGameCardButtonTextID = "#layout_xbox_ingame_menu_gamecard";
739 #endif
740 }
741
743 protected void LoadFooterButtonTexts()
744 {
745 TextWidget uiGamecardText = TextWidget.Cast(layoutRoot.FindAnyWidget("GamercardText"));
746 TextWidget uiBackText = TextWidget.Cast(layoutRoot.FindAnyWidget("BackText"));
747 TextWidget uiSelectText = TextWidget.Cast(layoutRoot.FindAnyWidget("SelectText"));
748
749 if (uiGamecardText)
750 {
751 uiGamecardText.SetText(m_OpenGameCardButtonTextID);
752 }
753 if (uiBackText)
754 {
755 uiBackText.SetText(m_BackButtonTextID);
756 }
757 if (uiSelectText)
758 {
759 uiSelectText.SetText(m_SelectButtonTextID);
760 }
761 }
762
764 {
765 Man player = GetGame().GetPlayer();
766 if (m_PlayerAlive)
767 {
768 if (player.IsUnconscious())
769 {
770 SetFocus(m_RestartButton);
771 }
772 else
773 {
774 SetFocus(m_ContinueButton);
775 }
776 }
777 else
778 {
779 SetFocus(m_RestartDeadButton);
780 }
781 }
782
783 protected void UpdateControlsElements()
784 {
785 bool toolbarShow = false;
786 #ifdef PLATFORM_CONSOLE
788 #endif
789
790 if (toolbarShow)
791 {
792 RichTextWidget toolbar_text = RichTextWidget.Cast(layoutRoot.FindAnyWidget("ContextToolbarText"));
793 string text = "";
794 if (m_SelectAvailable)
795 text += string.Format(" %1",InputUtils.GetRichtextButtonIconFromInputAction("UAUISelect", m_SelectButtonTextID, EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
796 if (m_MuteAvailable)
797 text += string.Format(" %1",InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlX", m_CurrentMuteButtonText, EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
798 if (m_BackAvailable)
799 text += string.Format(" %1",InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", m_BackButtonTextID, EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
800 if (m_GamercardAvailable)
801 text += string.Format(" %1",InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlY", m_OpenGameCardButtonTextID, EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
802
803 toolbar_text.SetText(text);
804 }
805
806 RichTextWidget toolbar_b2 = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon0"));
807 toolbar_b2.SetText(InputUtils.GetRichtextButtonIconFromInputAction("UAUIBack", "", EUAINPUT_DEVICE_CONTROLLER));
808
809 bool onlineOpen = IsOnlineOpen();
810 layoutRoot.FindAnyWidget("toolbar_bg").Show(toolbarShow);
811 layoutRoot.FindAnyWidget("play_panel_root").Show(!onlineOpen);
812 layoutRoot.FindAnyWidget("play_panel_root2").Show(onlineOpen && !toolbarShow);
813 layoutRoot.FindAnyWidget("dayz_logo").Show(!onlineOpen);
814 }
815//#endif
816}
protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
Definition Inventory.c:164
protected void OnInputPresetChanged()
Definition Inventory.c:157
ActionInput GetInput()
class JsonControlMappingInfo m_BackButtonTextID
DayZGame g_Game
Definition DayZGame.c:3654
Mission mission
EPlayerStates
Icon x
Icon y
void Close()
PlayerBase GetPlayer()
proto native UAInputAPI GetUApi()
proto native owned string GetUid()
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
proto native void RespawnPlayer()
proto void GetVersion(out string version)
proto native Mission GetMission()
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
Definition Game.c:1392
proto native Input GetInput()
proto native DayZPlayer GetPlayer()
override ScriptCallQueue GetCallQueue(int call_category)
Definition DayZGame.c:1153
proto native World GetWorld()
proto native void RestartMission()
proto native BiosUserManager GetUserManager()
proto native UIManager GetUIManager()
proto native void LogoutRequestTime()
Logout methods.
proto native WorkspaceWidget GetWorkspace()
Super root of all classes in Enforce script.
Definition EnScript.c:11
static ref SyncPlayerList m_PlayerList
Definition ClientData.c:8
static ref ScriptInvoker SyncEvent_OnPlayerListUpdate
Definition ClientData.c:3
proto native EInputDeviceType GetCurrentInputDevice()
proto native bool IsEnabledMouseAndKeyboardEvenOnServer()
proto native bool IsEnabledMouseAndKeyboard()
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
void SetRandomCharacterForced(bool state)
Definition gameplay.c:1069
Mission class.
Definition gameplay.c:670
Hud GetHud()
Definition gameplay.c:697
ScriptInvoker GetOnInputPresetChanged()
Definition gameplay.c:833
void AbortMission()
Definition gameplay.c:747
void Pause()
Definition gameplay.c:744
void Continue()
Definition gameplay.c:745
ScriptInvoker GetOnInputDeviceChanged()
Definition gameplay.c:823
static void ShowUserProfile(string uid)
static ref ScriptInvoker m_PermissionsAsyncInvoker
static map< string, bool > GetMuteList()
static void ShowInviteScreen()
static bool IsPlayerMuted(string id)
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
string m_UID
Definition SyncPlayer.c:3
string m_PlayerName
Definition SyncPlayer.c:4
ref array< ref SyncPlayer > m_PlayerList
proto native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
bool CloseAll()
Close all opened menus.
Definition UIManager.c:80
protected ref PlayerListScriptedWidget m_ServerInfoPanel
protected ButtonWidget m_OnlineButton
protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
protected bool m_BackAvailable
protected string m_BackButtonTextID
protected bool m_SelectAvailable
const int BUTTON_XBOX_CONTROLS
void ButtonSetText(Widget w, string text)
protected string m_UnmuteButtonTextID
protected bool m_MuteAvailable
override void Update(float timeslice)
void ColorDisable(Widget w)
protected Widget m_OnlineMenu
protected string m_CurrentMuteButtonText
override void Refresh()
protected ButtonWidget m_RestartButton
void MenuRequestRespawn(UIScriptedMenu menu, bool random)
void GameRetry(bool random)
override void OnShow()
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
protected void LoadTextStrings()
Set correct bottom button texts based on platform (ps4 vs xbox texts)
void ButtonSetColor(Widget w, int color)
protected bool m_GamercardAvailable
protected bool m_PlayerAlive
protected string m_MuteButtonTextID
protected ButtonWidget m_ExitButton
protected ButtonWidget m_TutorialsButton
bool IsLocalPlayer(string uid)
protected void OnInputPresetChanged()
void ButtonSetTextColor(Widget w, int color)
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
protected void UpdateControlsElements()
void ColorNormal(Widget w)
protected ButtonWidget m_OptionsButton
SyncPlayerList CreateFakePlayerList(int player_count)
protected ButtonWidget m_ControlsButton
protected void SetMuteButtonText(bool isMuted)
Set mute text button text (mute / unmute)
override Widget Init()
protected void UpdateGUI()
Definition InGameMenu.c:290
override bool OnModalResult(Widget w, int x, int y, int code, int result)
void SyncEvent_OnRecievedPlayerList(SyncPlayerList player_list)
protected TextWidget m_Version
override bool OnFocusLost(Widget w, int x, int y)
bool IsFocusable(Widget w)
override bool OnMouseEnter(Widget w, int x, int y)
void ColorHighlight(Widget w)
protected void LoadFooterButtonTexts()
Initial texts load for the footer buttons.
override bool OnFocus(Widget w, int x, int y)
protected string m_SelectButtonTextID
override bool OnClick(Widget w, int x, int y, int button)
protected ButtonWidget m_RestartDeadButton
protected ButtonWidget m_ContinueButton
void OnPermissionsUpdate(BiosPrivacyUidResultArray result_list)
protected string m_OpenGameCardButtonTextID
proto native bool IsDisabledReceivingVoN()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
const int RESPAWN_MODE_CUSTOM
Definition constants.c:878
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int MENU_TUTORIAL
Definition constants.c:182
const int MENU_XBOX_CONTROLS
Definition constants.c:175
const int MENU_RESPAWN_DIALOGUE
Definition constants.c:187
const int MENU_OPTIONS
Definition constants.c:161
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
void Continue()
Timer continue when it was paused.
Definition tools.c:246
const int CALL_CATEGORY_GUI
Definition tools.c:9
const int IDC_INT_EXIT
Definition constants.c:138
const int IDC_MAIN_OPTIONS
Definition constants.c:122
const int IDC_MULTI_INVITE
Definition constants.c:130
const int IDC_MAIN_QUIT
Definition constants.c:124
const int IDC_MAIN_CONTINUE
Definition constants.c:125
const int IDC_INT_RETRY
ingame menu
Definition constants.c:136
const int IDC_MAIN_ONLINE
Definition constants.c:128
proto native Widget GetFocus()
proto native void SetFocus(Widget w)
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
EInputDeviceType
Definition input.c:3
int ARGB(int a, int r, int g, int b)
Definition proto.c:322