39 m_ContinueButton = layoutRoot.FindAnyWidget(
"continuebtn");
40 m_SeparatorPanel = layoutRoot.FindAnyWidget(
"separator_red");
41 m_ExitButton = layoutRoot.FindAnyWidget(
"exitbtn");
42 m_RestartButton = layoutRoot.FindAnyWidget(
"restartbtn");
43 m_RespawnButton = layoutRoot.FindAnyWidget(
"respawn_button");
44 m_RestartDeadRandomButton = layoutRoot.FindAnyWidget(
"respawn_button_random");
45 m_RestartDeadCustomButton = layoutRoot.FindAnyWidget(
"respawn_button_custom");
46 m_OptionsButton = layoutRoot.FindAnyWidget(
"optionsbtn");
49 m_ServerInfoPanel = layoutRoot.FindAnyWidget(
"server_info");
50 m_ServerIP =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"server_ip"));
51 m_ServerPort =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"server_port"));
52 m_ServerName =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"server_name"));
53 m_FavoriteImage = layoutRoot.FindAnyWidget(
"favorite_image");
54 m_UnfavoriteImage = layoutRoot.FindAnyWidget(
"unfavorite_image");
55 m_CopyInfoButton = layoutRoot.FindAnyWidget(
"copy_button");
83 version_widget.SetText(
"#main_menu_version" +
" " + version);
86 version_widget.SetText(
"THIS IS PREVIEW");
99 m_ServerPort.SetText(info.m_HostPort.ToString());
100 m_ServerIP.SetText(info.m_HostIp);
101 m_ServerName.SetText(info.m_Name);
102 m_UnfavoriteImage.Show(info.m_Favorite);
103 m_FavoriteImage.Show(!info.m_Favorite);
104 m_ServerInfoText =
"" + info.GetIpPort();
118 m_ServerPort.SetText(port.ToString());
119 m_ServerIP.SetText(address);
120 m_ServerName.SetText(
name);
121 m_ServerInfoText =
"" + address +
":" + port;
127 g_Game.RefreshCurrentServerInfo();
161 super.OnClick(w,
x,
y, button);
163 if (w == m_ContinueButton)
168 else if (w == m_RestartButton)
173 else if (w == m_RespawnButton)
178 else if (w == m_OptionsButton)
183 else if (w == m_ExitButton)
188 else if (w == m_CopyInfoButton)
203 if (!
GetGame().IsMultiplayer())
217 if (player && player.IsUnconscious())
247 super.OnModalResult(w,
x,
y, code, result);
260 g_Game.CancelLoginTimeCountdown();
265 g_Game.CancelLoginTimeCountdown();
285 super.Update(timeslice);
293 m_RestartButton.Show(
false);
294 m_RespawnButton.Show(
false);
297 bool playerAlive = player && player.GetPlayerState() ==
EPlayerStates.ALIVE;
301 m_RestartButton.Show(playerAlive && player.IsUnconscious());
302 m_RespawnButton.Show(!playerAlive);
306 m_RestartButton.Show(
true);
307 m_RespawnButton.Show(
false);
308 m_SeparatorPanel.Show(playerAlive);
311 m_ContinueButton.Show(playerAlive);
317 if (RespawnDialogue.Cast(menu))
329 player.SimulateDeath(
true);
333 MissionGameplay missionGP = MissionGameplay.Cast(
GetGame().GetMission());
334 missionGP.DestroyAllMenus();
335 missionGP.SetPlayerRespawning(
true);
336 missionGP.Continue();
381 Widget panel = w.FindWidget(w.GetName() +
"_panel");
383 panel.SetColor(color);
390 label.SetColor(color);
395 m_ServerInfoPanel.Show(show);
ref UiHintPanelLoading m_HintPanel
TextWidget m_ModdedWarning
void UiHintPanel(Widget parent_widget)
proto native void RespawnPlayer()
proto void GetVersion(out string version)
proto native Mission GetMission()
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
proto native void CopyToClipboard(string text)
proto native DayZPlayer GetPlayer()
override ScriptCallQueue GetCallQueue(int call_category)
proto native UIManager GetUIManager()
proto native void LogoutRequestTime()
Logout methods.
proto native WorkspaceWidget GetWorkspace()
static int COLOR_DISABLED_TEXT
static void GetCurrentServerInfo(string ip, int port)
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 native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
proto native CGame GetGame()
const int DEFAULT_CHARACTER_MENU_ID
const int RESPAWN_MODE_CUSTOM
const int IDC_INT_RETRY
ingame menu
int ARGB(int a, int r, int g, int b)