62 IngameHud hud = IngameHud.Cast(
mission.GetHud());
66 hud.ShowQuickbarUI(
true);
72 PPERequesterBank.GetRequester(PPERequester_MenuEffects).Stop();
77 #ifdef PLATFORM_CONSOLE
84 bool mk =
g_Game.GetInput().IsEnabledMouseAndKeyboard();
85 bool mkServer =
g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
87 switch (pInputDeviceType)
93 g_Game.GetUIManager().ShowUICursor(
false);
103 #ifdef PLATFORM_MSSTORE
113 g_Game.GetUIManager().ShowUICursor(
true);
117 #ifdef PLATFORM_MSSTORE
131 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/xbox/day_z_ingamemenu_xbox.layout");
133 m_OnlineMenu =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/xbox/ingamemenu_xbox/online_info_menu.layout", layoutRoot);
137 m_ContinueButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn"));
139 m_ExitButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"exitbtn"));
140 m_RestartButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"restartbtn"));
141 m_OptionsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"optionsbtn"));
142 m_InviteButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"invitebtn"));
143 m_ControlsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"controlsbtn"));
144 m_OnlineButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"onlinebtn"));
147 m_ShowFeedback = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"feedbackbtn"));
149 m_FeedbackClose = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"close_button"));
151 m_DialogPanel = layoutRoot.FindAnyWidget(
"ingame_menu_dialog");
160 #ifdef PLATFORM_MSSTORE
172 player.GetOnUnconsciousStart().Insert(
UpdateGUI);
174 player.GetOnUnconsciousStop().Insert(
UpdateGUI);
176 player.GetOnDeathStart().Insert(
UpdateGUI);
181 g_Game.GetVersion(version);
182 #ifdef PLATFORM_CONSOLE
183 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
185 version =
"#main_menu_version" +
" " + version;
189 if (
g_Game.IsMultiplayer())
194 w_text.SetText(
g_Game.GetHostName());
230 layoutRoot.FindAnyWidget(
"onlinebtn").Show(
false);
231 layoutRoot.FindAnyWidget(
"invitebtn").Show(
false);
235 if (
g_Game.IsMultiplayer())
252 IngameHud hud = IngameHud.Cast(
mission.GetHud());
255 hud.ShowHudUI(
false);
256 hud.ShowQuickbarUI(
false);
262 PPERequester_MenuEffects requester;
263 Class.
CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
264 requester.SetVignetteIntensity(0.6);
280 super.OnClick(w,
x,
y, button);
284 switch (w.GetUserID())
310 g_Game.GetUIManager().ShowDialog(
"#main_menu_exit",
"#main_menu_exit_desc",
IDC_INT_EXIT, DBT_YESNO, DBB_YES, DMT_QUESTION, NULL);
315 if (!
g_Game.IsMultiplayer())
317 g_Game.GetUIManager().ShowDialog(
"#main_menu_restart",
"Are you sure you want to restart?",
IDC_INT_RETRY, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
321 g_Game.GetUIManager().ShowDialog(
"#main_menu_respawn",
"#main_menu_respawn_question",
IDC_INT_RETRY, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
385 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Start();
389 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Stop();
403 super.OnModalResult(w,
x,
y, code, result);
407 if (
g_Game.IsMultiplayer())
409 MissionGameplay
mission = MissionGameplay.Cast(
g_Game.GetMission());
412 g_Game.LogoutRequestTime();
415 int logoutAfterCancelTimeout =
g_Game.GetLogoutAfterCancelTimeout();
416 if (logoutAfterCancelTimeout > 0)
418 mission.SetExitButtonDisabledRemainingTime(logoutAfterCancelTimeout);
426 g_Game.GetMission().AbortMission();
428 g_Game.CancelLoginTimeCountdown();
435 g_Game.CancelLoginTimeCountdown();
439 if (result == DBB_YES)
462 if (
g_Game.IsMultiplayer())
464 g_Game.GetMenuDefaultCharacterData(
false).SetRandomCharacterForced(random);
470 player.SimulateDeath(
true);
474 MissionGameplay missionGP = MissionGameplay.Cast(
g_Game.GetMission());
475 missionGP.DestroyAllMenus();
476 missionGP.SetPlayerRespawning(
true);
477 missionGP.Continue();
499 if (
g_Game.GetUserManager())
501 local_uid =
g_Game.GetUserManager().GetSelectedUser().GetUid();
504 return (uid == local_uid);
512 for (
int i = 0; i < player_count; i++)
515 sync_player.
m_UID =
"uid" + i;
525 MissionGameplay
mission = MissionGameplay.Cast(
g_Game.GetMission());
526 float remainingTime =
mission.GetExitButtonDisabledRemainingTime();
527 if (remainingTime > 0)
532 layoutRoot.FindAnyWidget(
"exitbtn_label1").Show(
true);
533 layoutRoot.FindAnyWidget(
"spacer1").Show(
true);
534 layoutRoot.FindAnyWidget(
"spacer2").Show(
true);
549 layoutRoot.FindAnyWidget(
"exitbtn_label1").Show(
false);
550 layoutRoot.FindAnyWidget(
"spacer1").Show(
false);
551 layoutRoot.FindAnyWidget(
"spacer2").Show(
false);
559 super.Update(timeslice);
574 if (
g_Game.IsMultiplayer() && layoutRoot.FindAnyWidget(
"OnlineInfo").IsVisible())
576 PlayerListEntryScriptedWidget selected;
582 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
593 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
612 bool shouldUpdateMenuFocus =
false;
613 Man player =
g_Game.GetPlayer();
685 #ifdef PLATFORM_CONSOLE
686 #ifndef PLATFORM_MSSTORE
687 bool mk =
g_Game.GetInput().IsEnabledMouseAndKeyboard();
688 bool mk_server =
g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
694 warning.SetText(
"#str_mouse_and_keyboard_server_warning");
698 warning.SetText(
"#str_controller_server_warning");
779 g_Game.GetVersion(version);
780 #ifdef PLATFORM_CONSOLE
781 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
783 version =
"#main_menu_version" +
" " + version;
793 if (selected && !selected.IsLocalPlayer())
808 #ifdef PLATFORM_WINDOWS
812 ButtonWidget button = ButtonWidget.Cast(w);
815 button.SetTextColor(
ARGB(255, 255, 255, 255));
828 int color_pnl =
ARGB(255, 0, 0, 0);
829 int color_lbl =
ARGB(255, 255, 0, 0);
831 #ifdef PLATFORM_CONSOLE
832 color_pnl =
ARGB(255, 200, 0, 0);
833 color_lbl =
ARGB(255, 255, 255, 255);
844 int color_pnl =
ARGB(0, 0, 0, 0);
845 int color_lbl =
ARGB(255, 255, 255, 255);
873 Widget panel = w.FindWidget(w.GetName() +
"_panel");
876 panel.SetColor(color);
893 label.SetColor(color);
898 text.SetColor(color);
903 text2.SetColor(color);
963 Man player =
g_Game.GetPlayer();
983 bool toolbarShow = !
g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer() ||
g_Game.GetInput().GetCurrentInputDevice() ==
EInputDeviceType.CONTROLLER;
985 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
986 layoutRoot.FindAnyWidget(
"top").Show(!onlineOpen);
991 layoutRoot.FindAnyWidget(
"bottom").Show(!toolbarShow);
995 layoutRoot.FindAnyWidget(
"bottom").Show(
true);
998 string contineBtnText =
"";
1001 string toolbarText =
"";
1044 toolbarTextWidget.SetText(toolbarText);
1047 string continueBtnLabel =
"#main_menu_continue";
1049 continueBtnLabel =
"#layout_character_creation_back";
1051 TextWidget continueBtnTextWidget =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn_label"));
1052 continueBtnTextWidget.SetText(continueBtnLabel);
1053 layoutRoot.FindAnyWidget(
"dayz_logo").Show(!onlineOpen);
array< ref BiosPrivacyUidResult > BiosPrivacyUidResultArray
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 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 ...
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
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
Keeping for backwards compatability with mods.
ref array< ref SyncPlayer > m_PlayerList
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int RESPAWN_MODE_CUSTOM
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Round(float f)
Returns mathematical round of value.
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.
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_FEEDBACK
const int IDC_MAIN_TUTORIAL
const int IDC_MAIN_ONLINE
int ARGB(int a, int r, int g, int b)