38 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/main_menu_console.layout");
40 m_MainMenuPanel = layoutRoot.FindAnyWidget(
"main_menu_panel");
41 m_PlayerName = TextWidget.Cast(layoutRoot.FindAnyWidget(
"character_name_xbox"));
42 m_ChangeAccount = layoutRoot.FindAnyWidget(
"choose_account");
43 m_CustomizeCharacter = layoutRoot.FindAnyWidget(
"customize_character");
44 m_PlayVideo = layoutRoot.FindAnyWidget(
"play_video");
45 m_Tutorials = layoutRoot.FindAnyWidget(
"tutorials");
46 m_Options = layoutRoot.FindAnyWidget(
"options");
47 m_Controls = layoutRoot.FindAnyWidget(
"controls");
48 m_Play = layoutRoot.FindAnyWidget(
"play");
49 m_MessageButton = layoutRoot.FindAnyWidget(
"message_button");
51 m_DlcFrame = layoutRoot.FindAnyWidget(
"dlc_Frame");
52 m_Version = TextWidget.Cast(layoutRoot.FindAnyWidget(
"version"));
54 m_ShowFeedback = layoutRoot.FindAnyWidget(
"feedback");
55 m_FeedbackQRCode = ImageWidget.Cast(layoutRoot.FindAnyWidget(
"qr_image"));
56 m_FeedbackClose = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"close_button"));
57 m_FeedbackCloseLabel =
RichTextWidget.Cast(layoutRoot.FindAnyWidget(
"close_button_label"));
58 m_DialogPanel = layoutRoot.FindAnyWidget(
"main_menu_dialog");
60 m_LastFocusedButton =
m_Play;
62 GetGame().GetUIManager().ScreenFadeOut(1);
65 if (!
GetGame().GetProfileString(
"FirstLaunchDone", launch_done) || launch_done !=
"true")
67 GetGame().SetProfileString(
"FirstLaunchDone",
"true");
68 GetGame().GetUIManager().ShowDialog(
"#main_menu_tutorial",
"#main_menu_tutorial_desc", 555, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
86 #ifdef PLATFORM_CONSOLE
88 m_ChangeAccount.Show(
GetGame().GetInput().IsEnabledMouseAndKeyboard());
89 m_FeedbackQRCode.LoadImageFile(0,
"gui/textures/feedback_qr_xbox.edds");
91 m_FeedbackQRCode.LoadImageFile(0,
"gui/textures/feedback_qr_ps.edds");
163 m_DlcHandlers.Clear();
167 int count = m_DlcData.DLCs.Count();
171 for (
int i = 0; i < count; i++)
173 data = m_DlcData.DLCs[i];
174 info = m_AllDlcsMap.Get(data.Name);
175 MainMenuDlcHandlerBase handler =
new MainMenuDlcHandlerBase(info, m_DlcFrame, data);
177 handler.ShowInfoPanel(
true);
178 m_DisplayedDlcHandler = handler;
180 m_DlcHandlers.Insert(handler);
193 switch (pInputDeviceType)
196 if (
GetGame().GetInput().IsEnabledMouseAndKeyboard())
198 GetGame().GetUIManager().ShowUICursor(
false);
199 #ifdef PLATFORM_CONSOLE
200 if (m_LastFocusedButton == m_ShowFeedback || !GetFocus() || GetFocus() == m_FeedbackClose)
205 m_FeedbackClose.Show(
false);
206 m_ShowFeedback.Show(
false);
208 m_ChangeAccount.Show(
false);
209 if (m_LastFocusedButton == m_ChangeAccount)
219 if (
GetGame().GetInput().IsEnabledMouseAndKeyboard())
221 GetGame().GetUIManager().ShowUICursor(
true);
222 #ifdef PLATFORM_CONSOLE
223 m_ShowFeedback.Show(
true);
224 m_FeedbackClose.Show(
true);
227 m_ChangeAccount.Show(
true);
363 SetFocus(m_LastFocusedButton);
368 if (m_ScenePC && m_ScenePC.GetIntroCamera())
370 m_ScenePC.GetIntroCamera().LookAt(m_ScenePC.GetIntroCharacter().GetPosition() +
Vector(0, 1, 0));
372 if (m_DisplayedDlcHandler)
373 m_DisplayedDlcHandler.ShowInfoPanel(
true);
376 #ifdef PLATFORM_CONSOLE
377 layoutRoot.FindAnyWidget(
"ButtonHolderCredits").Show(
GetGame().GetInput().IsEnabledMouseAndKeyboard());
391 super.Update(timeslice);
393 if (
g_Game.GetLoadState() != DayZGameState.CONNECTING && !
GetGame().GetUIManager().IsDialogVisible())
395 #ifndef PLATFORM_CONSOLE
396 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
398 if (!
GetGame().GetUIManager().IsDialogHiding())
402 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
414 if (
GetUApi().GetInputByID(UAUICredits).LocalPress())
420 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
424 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
427 m_DisplayedDlcHandler.GetModInfo().GoToStore();
430 if (
GetUApi().GetInputByID(UAUIThumbRight).LocalPress())
650 toolbar_text.SetText(context);
proto native vector Vector(float x, float y, float z)
Vector constructor from components.