57 IngameHud hud = IngameHud.Cast(
mission.GetHud());
61 hud.ShowQuickbarUI(
true);
67 PPERequesterBank.GetRequester(PPERequester_MenuEffects).Stop();
72 #ifdef PLATFORM_CONSOLE
82 switch (pInputDeviceType)
123 m_ContinueButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn"));
125 m_ExitButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"exitbtn"));
126 m_RestartButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"restartbtn"));
127 m_OptionsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"optionsbtn"));
128 m_InviteButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"invitebtn"));
129 m_ControlsButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"controlsbtn"));
130 m_OnlineButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"onlinebtn"));
133 m_ShowFeedback = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"feedbackbtn"));
135 m_FeedbackClose = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"close_button"));
137 m_DialogPanel = layoutRoot.FindAnyWidget(
"ingame_menu_dialog");
151 player.GetOnUnconsciousStart().Insert(
UpdateGUI);
153 player.GetOnUnconsciousStop().Insert(
UpdateGUI);
155 player.GetOnDeathStart().Insert(
UpdateGUI);
161 #ifdef PLATFORM_CONSOLE
162 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
164 version =
"#main_menu_version" +
" " + version;
173 w_text.SetText(
g_Game.GetHostName());
208 layoutRoot.FindAnyWidget(
"onlinebtn").Show(
false);
209 layoutRoot.FindAnyWidget(
"invitebtn").Show(
false);
230 IngameHud hud = IngameHud.Cast(
mission.GetHud());
233 hud.ShowHudUI(
false);
234 hud.ShowQuickbarUI(
false);
240 PPERequester_MenuEffects requester;
241 Class.
CastTo(requester,PPERequesterBank.GetRequester(PPERequester_MenuEffects));
242 requester.SetVignetteIntensity(0.6);
258 super.OnClick(w,
x,
y, button);
262 switch (w.GetUserID())
293 if (!
GetGame().IsMultiplayer())
363 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Start();
367 PPERequesterBank.GetRequester(PPERequester_FeedbackBlur).Stop();
381 super.OnModalResult(w,
x,
y, code, result);
395 g_Game.CancelLoginTimeCountdown();
402 g_Game.CancelLoginTimeCountdown();
406 if (result == DBB_YES)
437 player.SimulateDeath(
true);
441 MissionGameplay missionGP = MissionGameplay.Cast(
GetGame().GetMission());
442 missionGP.DestroyAllMenus();
443 missionGP.SetPlayerRespawning(
true);
444 missionGP.Continue();
466 if (
GetGame().GetUserManager())
471 return (uid == local_uid);
479 for (
int i = 0; i < player_count; i++)
482 sync_player.
m_UID =
"uid" + i;
492 super.Update(timeslice);
499 if (
GetGame().IsMultiplayer() && layoutRoot.FindAnyWidget(
"OnlineInfo").IsVisible())
501 PlayerListEntryScriptedWidget selected;
507 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
518 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
537 bool shouldUpdateMenuFocus =
false;
610 #ifdef PLATFORM_CONSOLE
618 warning.SetText(
"#str_mouse_and_keyboard_server_warning");
622 warning.SetText(
"#str_controller_server_warning");
691 #ifdef PLATFORM_CONSOLE
692 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
694 version =
"#main_menu_version" +
" " + version;
704 if (selected && !selected.IsLocalPlayer())
719 #ifdef PLATFORM_WINDOWS
723 ButtonWidget button = ButtonWidget.Cast(w);
726 button.SetTextColor(
ARGB(255, 255, 255, 255));
739 int color_pnl =
ARGB(255, 0, 0, 0);
740 int color_lbl =
ARGB(255, 255, 0, 0);
742 #ifdef PLATFORM_CONSOLE
743 color_pnl =
ARGB(255, 200, 0, 0);
744 color_lbl =
ARGB(255, 255, 255, 255);
755 int color_pnl =
ARGB(0, 0, 0, 0);
756 int color_lbl =
ARGB(255, 255, 255, 255);
784 Widget panel = w.FindWidget(w.GetName() +
"_panel");
787 panel.SetColor(color);
804 label.SetColor(color);
809 text.SetColor(color);
814 text2.SetColor(color);
896 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
897 layoutRoot.FindAnyWidget(
"top").Show(!onlineOpen);
902 layoutRoot.FindAnyWidget(
"bottom").Show(!toolbarShow);
906 layoutRoot.FindAnyWidget(
"bottom").Show(
true);
910 string contineBtnText =
"";
911 continueBtnIcon.Show(!toolbarShow);
914 string toolbarText =
"";
957 toolbarTextWidget.SetText(toolbarText);
958 continueBtnIcon.SetText(contineBtnText);
961 string continueBtnLabel =
"#main_menu_continue";
963 continueBtnLabel =
"#layout_character_creation_back";
965 TextWidget continueBtnTextWidget =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"continuebtn_label"));
966 continueBtnTextWidget.SetText(continueBtnLabel);
967 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)