57 IngameHud hud = IngameHud.Cast(
mission.GetHud());
61 hud.ShowQuickbarUI(
true);
67 PPERequesterBank.GetRequester(PPERequester_MenuEffects).Stop();
72 #ifdef PLATFORM_CONSOLE
82 switch (pInputDeviceType)
120 m_ContinueButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn"));
122 m_ExitButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"exitbtn"));
123 m_RestartButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"restartbtn"));
124 m_OptionsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"optionsbtn"));
125 m_InviteButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"invitebtn"));
126 m_ControlsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"controlsbtn"));
127 m_OnlineButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"onlinebtn"));
130 m_ShowFeedback = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"feedbackbtn"));
132 m_FeedbackClose = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"close_button"));
134 m_DialogPanel = layoutRoot.FindAnyWidget(
"ingame_menu_dialog");
148 player.GetOnUnconsciousStart().Insert(
UpdateGUI);
150 player.GetOnUnconsciousStop().Insert(
UpdateGUI);
152 player.GetOnDeathStart().Insert(
UpdateGUI);
158 #ifdef PLATFORM_CONSOLE
159 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
161 version =
"#main_menu_version" +
" " + version;
170 w_text.SetText(
g_Game.GetHostName());
205 layoutRoot.FindAnyWidget(
"onlinebtn").Show(
false);
206 layoutRoot.FindAnyWidget(
"invitebtn").Show(
false);
228 IngameHud hud = IngameHud.Cast(
mission.GetHud());
231 hud.ShowHudUI(
false);
232 hud.ShowQuickbarUI(
false);
238 PPERequester_MenuEffects requester;
239 Class.
CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
240 requester.SetVignetteIntensity(0.6);
256 super.OnClick(w,
x,
y, button);
260 switch (w.GetUserID())
284 if (!
GetGame().IsMultiplayer())
315 if (w == layoutRoot.FindAnyWidget(
"backbtn"))
358 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Start();
362 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Stop();
376 super.OnModalResult(w,
x,
y, code, result);
390 g_Game.CancelLoginTimeCountdown();
397 g_Game.CancelLoginTimeCountdown();
401 if (result == DBB_YES)
433 player.SimulateDeath(
true);
437 MissionGameplay missionGP = MissionGameplay.Cast(
GetGame().GetMission());
438 missionGP.DestroyAllMenus();
439 missionGP.SetPlayerRespawning(
true);
440 missionGP.Continue();
458 if (
GetGame().GetUserManager())
460 return (uid == local_uid);
467 for (
int i = 0; i < player_count; i++)
470 sync_player.
m_UID =
"uid" + i;
479 super.Update(timeslice);
486 if (
GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget(
"OnlineInfo").IsVisible())
488 PlayerListEntryScriptedWidget selected;
491 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
499 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
516 bool shouldUpdateMenuFocus =
false;
587 #ifdef PLATFORM_CONSOLE
595 warning.SetText(
"#str_mouse_and_keyboard_server_warning");
599 warning.SetText(
"#str_controller_server_warning");
666 #ifdef PLATFORM_CONSOLE
667 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
669 version =
"#main_menu_version" +
" " + version;
679 if (selected && !selected.IsLocalPlayer())
694 #ifdef PLATFORM_WINDOWS
698 ButtonWidget button = ButtonWidget.Cast(w);
701 button.SetTextColor(
ARGB(255, 255, 255, 255));
712 int color_pnl =
ARGB(255, 0, 0, 0);
713 int color_lbl =
ARGB(255, 255, 0, 0);
715 #ifdef PLATFORM_CONSOLE
716 color_pnl =
ARGB(255, 200, 0, 0);
717 color_lbl =
ARGB(255, 255, 255, 255);
729 int color_pnl =
ARGB(0, 0, 0, 0);
730 int color_lbl =
ARGB(255, 255, 255, 255);
755 Widget panel = w.FindWidget(w.GetName() +
"_panel");
759 panel.SetColor(color);
774 label.SetColor(color);
779 text.SetColor(color);
784 text2.SetColor(color);
858 bool toolbarShow =
false;
859 #ifdef PLATFORM_CONSOLE
884 toolbar_text.SetText(text);
891 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
892 layoutRoot.FindAnyWidget(
"play_panel_root").Show(!onlineOpen);
893 layoutRoot.FindAnyWidget(
"play_panel_root2").Show(onlineOpen && !toolbarShow);
894 layoutRoot.FindAnyWidget(
"dayz_logo").Show(!onlineOpen);
array< ref BiosPrivacyUidResult > BiosPrivacyUidResultArray
proto native owned string GetUid()
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
proto native UIManager GetUIManager()
proto native void RestartMission()
proto native World GetWorld()
override ScriptCallQueue GetCallQueue(int call_category)
proto native BiosUserManager GetUserManager()
proto native void LogoutRequestTime()
Logout methods.
proto native DayZPlayer GetPlayer()
proto native WorkspaceWidget GetWorkspace()
proto native void RespawnPlayer()
proto void GetVersion(out string version)
proto native Input GetInput()
proto native Mission GetMission()
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
static bool GetDisableRespawnInUnconsciousness()
Super root of all classes in Enforce script.
static ref ScriptInvoker SyncEvent_OnPlayerListUpdate
static ref SyncPlayerList m_PlayerList
ScriptInvoker GetOnInputDeviceChanged()
ScriptInvoker GetOnInputPresetChanged()
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 ...
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
proto native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
void ShowUICursor(bool visible)
proto native bool IsDisabledReceivingVoN()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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.
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)