47 m_Play = layoutRoot.FindAnyWidget(
"play");
48 m_ChooseServer = layoutRoot.FindAnyWidget(
"choose_server");
49 m_CustomizeCharacter = layoutRoot.FindAnyWidget(
"customize_character");
50 m_PlayVideo = layoutRoot.FindAnyWidget(
"play_video");
51 m_Tutorials = layoutRoot.FindAnyWidget(
"tutorials");
52 m_TutorialButton = layoutRoot.FindAnyWidget(
"tutorial_button");
53 m_MessageButton = layoutRoot.FindAnyWidget(
"message_button");
54 m_SettingsButton = layoutRoot.FindAnyWidget(
"settings_button");
55 m_Exit = layoutRoot.FindAnyWidget(
"exit_button");
56 m_PrevCharacter = layoutRoot.FindAnyWidget(
"prev_character");
57 m_NextCharacter = layoutRoot.FindAnyWidget(
"next_character");
59 m_Version =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"version"));
61 m_CharacterRotationFrame = layoutRoot.FindAnyWidget(
"character_rotation_frame");
63 m_LastPlayedTooltip = layoutRoot.FindAnyWidget(
"last_server_info");
64 m_LastPlayedTooltip.Show(
false);
65 m_LastPlayedTooltipLabel = m_LastPlayedTooltip.FindAnyWidget(
"last_server_info_label");
66 m_LastPlayedTooltipName =
TextWidget.Cast(m_LastPlayedTooltip.FindAnyWidget(
"last_server_info_name"));
67 m_LastPlayedTooltipIP =
TextWidget.Cast(m_LastPlayedTooltip.FindAnyWidget(
"last_server_info_ip"));
68 m_LastPlayedTooltipPort =
TextWidget.Cast(m_LastPlayedTooltip.FindAnyWidget(
"last_server_info_port"));
70 m_LastPlayedTooltipTimer =
new WidgetFadeTimer();
72 m_Stats =
new MainMenuStats(layoutRoot.FindAnyWidget(
"character_stats_root"));
76 m_LastFocusedButton =
m_Play;
85 m_PlayVideo.Show(
false);
87 m_PlayerName =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"character_name_text"));
92 m_Version.SetText(
"#main_menu_version" +
" " + version);
104 g_Game.SetLoadState(DayZLoadState.MAIN_MENU_CONTROLLER_SELECT);
119 if (modArray.Count() > 0)
121 modArray.Remove(modArray.Count() - 1);
132 if (modArray.Count() > 0)
134 layoutRoot.FindAnyWidget(
"ModsSimple").Show(
true);
135 m_ModsTooltip =
new ModsMenuTooltip(layoutRoot);
137 m_ModsDetailed =
new ModsMenuDetailed(modArray, layoutRoot.FindAnyWidget(
"ModsDetailed"), m_ModsTooltip,
this);
139 m_ModsSimple =
new ModsMenuSimple(modArray, layoutRoot.FindAnyWidget(
"ModsSimple"), m_ModsDetailed);
145 if (w == m_CharacterRotationFrame)
168 m_LastFocusedButton =
m_Play;
172 else if (w == m_ChooseServer)
178 else if (w == m_CustomizeCharacter)
183 else if (w == m_TutorialButton)
188 else if (w == m_MessageButton)
193 else if (w == m_SettingsButton)
198 else if (w == m_Exit)
203 else if (w == m_PrevCharacter)
208 else if (w == m_NextCharacter)
213 else if (w == m_PlayVideo)
219 else if (w == m_Tutorials)
242 m_LastPlayedTooltipName.SetText(
"#server_details_name " +
name);
243 m_LastPlayedTooltipIP.SetText(
"#main_menu_IP " + ip);
244 m_LastPlayedTooltipPort.SetText(
"#main_menu_port " + port);
246 m_LastPlayedTooltipTimer.FadeIn(m_LastPlayedTooltip, 0.3,
true);
262 m_LastPlayedTooltipTimer.FadeOut(m_LastPlayedTooltip, 0.3,
true);
297 if (w == m_Play || w == m_ChooseServer || w == m_CustomizeCharacter || w == m_TutorialButton || w == m_MessageButton || w == m_SettingsButton);
302 if (w == m_Exit || w == m_PlayVideo);
307 if (w == m_NewsMain || w == m_NewsSec1 || w == m_NewsSec2 || w == m_PrevCharacter || w == m_NextCharacter);
326 m_Version.SetText(
"#main_menu_version" +
" " + version);
331 if (
g_Game.GetGameState() != DayZGameState.MAIN_MENU)
347 super.Update(timeslice);
357 if (!
g_Game.IsNewCharacter())
417 if (create_character)
421 m_PlayerName.SetText(m_ScenePC.
GetIntroCharacter().GetCharacterNameById(charID));
423 Widget w = m_CustomizeCharacter.FindAnyWidget(m_CustomizeCharacter.GetName() +
"_label");
431 text.SetText(
"#layout_main_menu_customize_char");
435 text.SetText(
"#layout_main_menu_rename");
489 if (
g_Game.GetLastVisitedServer(ip, port))
515 g_Game.ConnectFromServerBrowser(ip, port,
"");
538 else if (code == 555)
552 int color_pnl =
ARGB(255, 0, 0, 0);
553 int color_lbl =
ARGB(255, 255, 0, 0);
554 int color_img =
ARGB(255, 200, 0, 0);
566 int color_pnl =
ARGB(0, 0, 0, 0);
567 int color_lbl =
ARGB(255, 255, 255, 255);
568 int color_img =
ARGB(255, 255, 255, 255);
594 Widget panel = w.FindWidget(w.GetName() +
"_panel");
598 panel.SetColor(color);
607 Widget panel = w.FindWidget(w.GetName() +
"_image");
611 panel.SetColor(color);
626 label.SetColor(color);
631 text.SetColor(color);
636 text2.SetColor(color);
TextWidget m_ModdedWarning
protected Mission m_Mission
ref array< ref StatDebugObject > m_Stats
proto void GetVersion(out string version)
override ScriptCallQueue GetCallQueue(int call_category)
proto native void GetModInfos(notnull out array< ref ModInfo > modArray)
proto native UIManager GetUIManager()
proto native WorkspaceWidget GetWorkspace()
IntroSceneCharacter GetIntroCharacter()
void CharacterRotationStart()
void CharacterRotationStop()
static void AutoConnectToEmptyServer()
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 void CallByName(Class obj, string fnName, Param params=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 void ScreenFadeOut(float duration)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto native int Length()
Returns length of string.
int ARGB(int a, int r, int g, int b)