33 const int BUTTON_XBOX_CONTROLS = 201;
53 hud.ShowQuickbarUI(
true);
64#ifdef PLATFORM_CONSOLE
76 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/xbox/day_z_ingamemenu_xbox.layout");
78 m_OnlineMenu =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/xbox/ingamemenu_xbox/online_info_menu.layout", layoutRoot);
79 m_OnlineMenu.Show(
false);
81 m_ContinueButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn"));
82 m_RestartDeadButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"restartbtn_dead"));
83 m_ExitButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"exitbtn"));
84 m_RestartButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"restartbtn"));
85 m_OptionsButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"optionsbtn"));
86 m_ControlsButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"controlsbtn"));
87 m_OnlineButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"onlinebtn"));
88 m_TutorialsButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"tutorialsbtn"));
89 m_Version =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"version"));
91 m_SelectAvailable =
true;
92 m_MuteAvailable =
false;
93 m_GamercardAvailable =
false;
94 m_BackAvailable =
true;
102 m_PlayerAlive =
true;
109#ifdef PLATFORM_CONSOLE
110 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
112 version =
"#main_menu_version" +
" " + version;
114 m_Version.SetText(version);
118 m_OnlineButton.Show(
true);
123 m_ServerInfoPanel =
new PlayerListScriptedWidget(m_OnlineMenu.FindAnyWidget(
"ServerInfoPanel"));
131 string uid = m_ServerInfoPanel.FindPlayerByWidget(
GetFocus());
136 m_MuteAvailable =
false;
137 m_GamercardAvailable =
false;
141 m_MuteAvailable = !
GetGame().GetWorld().IsDisabledReceivingVoN();
143 m_GamercardAvailable =
true;
148 if (m_ServerInfoPanel.IsGloballyMuted(
uid))
149 m_MuteAvailable =
false;
154 layoutRoot.FindAnyWidget(
"onlinebtn").Show(
false);
155 layoutRoot.FindAnyWidget(
"invitebtn").Show(
false);
182 hud.ShowHudUI(
false);
183 hud.ShowQuickbarUI(
false);
206 switch (
w.GetUserID())
230 if (!
GetGame().IsMultiplayer())
238 m_OnlineMenu.Show(
true);
239 m_SelectAvailable =
false;
242 m_ServerInfoPanel.FocusFirst();
257 if (
w == layoutRoot.FindAnyWidget(
"backbtn"))
259 else if (
w == m_RestartDeadButton)
285 GetGame().GetMission().AbortMission();
287 g_Game.CancelLoginTimeCountdown();
293 g_Game.CancelLoginTimeCountdown();
318 GetGame().GetMenuDefaultCharacterData(
false).SetRandomCharacterForced(
random);
324 player.SimulateDeath(
true);
341 if (RespawnDialogue.Cast(
menu))
349 if (
GetGame().GetUserManager())
372 if (
GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget(
"OnlineInfo").IsVisible())
374 PlayerListEntryScriptedWidget
selected;
375 if (m_ServerInfoPanel)
376 selected = m_ServerInfoPanel.GetSelectedPlayer();
380 m_ServerInfoPanel.ToggleMute(
selected.GetUID());
412 m_RestartButton.Show(
false);
414 m_ContinueButton.Show(m_PlayerAlive);
415 m_RestartDeadButton.Show(!m_PlayerAlive);
420 return m_OnlineMenu.IsVisible();
425 m_OnlineMenu.Show(
false);
426 m_SelectAvailable =
true;
427 m_MuteAvailable =
false;
428 m_GamercardAvailable =
false;
436 if (m_ServerInfoPanel)
438 m_ServerInfoPanel.FocusFirst();
472 m_PlayerAlive =
true;
478 m_RestartButton.Show(
player.IsUnconscious());
481 m_RestartButton.Show(
false);
482 m_ContinueButton.Show(m_PlayerAlive);
483 m_RestartDeadButton.Show(!m_PlayerAlive);
487#ifdef PLATFORM_CONSOLE
488 bool mk =
GetGame().GetInput().IsEnabledMouseAndKeyboard();
489 bool mk_server =
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
494 warning.SetText(
"#str_mouse_and_keyboard_server_warning");
496 warning.SetText(
"#str_controller_server_warning");
548 if (
w == m_ContinueButton ||
w == m_ExitButton ||
w == m_RestartButton ||
w == m_OptionsButton ||
w == m_ControlsButton ||
w == m_OnlineButton ||
w == m_TutorialsButton);
558#ifdef PLATFORM_CONSOLE
559 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
561 version =
"#main_menu_version" +
" " + version;
563 m_Version.SetText(version);
565 m_MuteAvailable =
false;
566 m_GamercardAvailable =
false;
568 if (
GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget(
"OnlineInfo").IsVisible() && m_ServerInfoPanel)
570 PlayerListEntryScriptedWidget
selected = m_ServerInfoPanel.GetSelectedPlayer();
573 m_MuteAvailable = !
GetGame().GetWorld().IsDisabledReceivingVoN() && !
selected.IsGloballyMuted();
575 m_GamercardAvailable =
true;
586#ifdef PLATFORM_WINDOWS
592 button.SetTextColor(
ARGB(255, 255, 255, 255));
605#ifdef PLATFORM_CONSOLE
681 m_MuteButtonTextID =
"#ps4_ingame_menu_mute";
682 m_UnmuteButtonTextID =
"#ps4_ingame_menu_unmute";
684 m_SelectButtonTextID =
"#ps4_ingame_menu_select";
685 m_OpenGameCardButtonTextID =
"#ps4_ingame_menu_opencard";
687 m_MuteButtonTextID =
"#xbox_ingame_menu_mute";
688 m_UnmuteButtonTextID =
"#xbox_ingame_menu_unmute";
690 m_SelectButtonTextID =
"#layout_xbox_ingame_menu_select";
691 m_OpenGameCardButtonTextID =
"#layout_xbox_ingame_menu_gamecard";
727#ifdef PLATFORM_CONSOLE
735 if (m_SelectAvailable)
741 if (m_GamercardAvailable)
751 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
toolbarShow);
752 layoutRoot.FindAnyWidget(
"play_panel_root").Show(!
onlineOpen);
754 layoutRoot.FindAnyWidget(
"dayz_logo").Show(!
onlineOpen);
void OnInputPresetChanged()
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
class JsonControlMappingInfo m_BackButtonTextID
static bool GetDisableRespawnInUnconsciousness()
Super root of all classes in Enforce script.
static ref ScriptInvoker SyncEvent_OnPlayerListUpdate
static ref SyncPlayerList m_PlayerList
static ref ScriptInvoker m_PermissionsAsyncInvoker
static bool IsPlayerMuted(string id)
static void ShowInviteScreen()
static void ShowUserProfile(string uid)
static map< string, bool > GetMuteList()
proto native CGame GetGame()
const int RESPAWN_MODE_CUSTOM
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int IDC_MAIN_OPTIONS
const int IDC_MULTI_INVITE
const int IDC_MAIN_CONTINUE
const int IDC_INT_RETRY
ingame menu
const int IDC_MAIN_ONLINE
int ARGB(int a, int r, int g, int b)