12 protected Widget m_CustomizeCharacter;
13 protected Widget m_PlayVideo;
14 protected Widget m_Tutorials;
18 protected Widget m_MessageButton;
23 protected Widget m_DlcFrame;
27 protected ref MainMenuDlcHandlerBase m_DisplayedDlcHandler;
31 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/main_menu_console.layout");
33 m_PlayerName =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"character_name_xbox"));
35 m_ChangeAccount = layoutRoot.FindAnyWidget(
"choose_account");
36 m_CustomizeCharacter = layoutRoot.FindAnyWidget(
"customize_character");
37 m_PlayVideo = layoutRoot.FindAnyWidget(
"play_video");
38 m_Tutorials = layoutRoot.FindAnyWidget(
"tutorials");
39 m_Options = layoutRoot.FindAnyWidget(
"options");
40 m_Controls = layoutRoot.FindAnyWidget(
"controls");
41 m_Play = layoutRoot.FindAnyWidget(
"play");
42 m_MessageButton = layoutRoot.FindAnyWidget(
"message_button");
44 m_DlcFrame = layoutRoot.FindAnyWidget(
"dlc_Frame");
45 m_Version =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"version"));
47 m_LastFocusedButton = m_Play;
49 GetGame().GetUIManager().ScreenFadeOut(1);
54 GetGame().SetProfileString(
"FirstLaunchDone",
"true");
84 if (
GetGame().GetContentDLCService())
96 if (m_AllDLCs !=
null)
101 GetGame().GetModInfos(m_AllDLCs);
102 if (m_AllDLCs.Count() > 0)
104 m_AllDLCs.Remove(m_AllDLCs.Count() - 1);
108 FilterDLCs(m_AllDLCs);
120 m_AllDlcsMap.Clear();
123 for (
int i =
count - 1;
i >= 0;
i--)
126 if (!
info.GetIsDLC())
129 m_AllDlcsMap.Set(
info.GetName(),
info);
141 m_DlcHandlers.Clear();
145 int count = m_DlcData.DLCs.Count();
151 data = m_DlcData.DLCs[
i];
153 MainMenuDlcHandlerBase
handler =
new MainMenuDlcHandlerBase(
info, m_DlcFrame,
data);
156 m_DisplayedDlcHandler =
handler;
164#ifdef PLATFORM_CONSOLE
179 m_LastFocusedButton = m_Play;
180 OpenMenuServerBrowser();
183 else if (
w == m_Options)
185 m_LastFocusedButton = m_Options;
189 else if (
w == m_PlayVideo)
192 m_LastFocusedButton = m_PlayVideo;
196 else if (
w == m_Tutorials)
198 m_LastFocusedButton = m_Tutorials;
208 else if (
w == m_CustomizeCharacter)
210 m_LastFocusedButton = m_CustomizeCharacter;
211 OpenMenuCustomizeCharacter();
214 else if (
w == m_ChangeAccount)
216 m_LastFocusedButton = m_ChangeAccount;
220 else if (
w == m_MessageButton)
244 if (
GetGame().GetUserManager() &&
GetGame().GetUserManager().GetSelectedUser())
246 name =
GetGame().GetUserManager().GetSelectedUser().GetName();
247 if (
name.LengthUtf8() > 18)
253 m_PlayerName.SetText(
name);
257 m_Version.SetText(
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")");
277 if (m_DisplayedDlcHandler)
278 m_DisplayedDlcHandler.ShowInfoPanel(
true);
281#ifdef PLATFORM_CONSOLE
283 layoutRoot.FindAnyWidget(
"choose_account").Show(
GetGame().
GetInput().IsEnabledMouseAndKeyboard());
285 layoutRoot.FindAnyWidget(
"ButtonHolderCredits").Show(
GetGame().
GetInput().IsEnabledMouseAndKeyboard());
293 if (m_DisplayedDlcHandler)
294 m_DisplayedDlcHandler.ShowInfoPanel(
false);
304#ifndef PLATFORM_CONSOLE
319 if (CanStoreBeOpened())
320 m_DisplayedDlcHandler.GetModInfo().GoToStore();
326 return m_DisplayedDlcHandler !=
null;
371#ifndef PLATFORM_WINDOWS
374 GetGame().GetUIManager().Back();
393 ButtonSetAlphaAnim(
w);
406 ButtonSetAlphaAnim(
null);
419 else if (
code == 555)
458 SetWidgetAnimAlpha(
panel);
496#ifdef PLATFORM_CONSOLE
500 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
toolbarShow);
void OnInputPresetChanged()
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ref PluginDayzPlayerDebug_Ctrl m_Controls
void ColorNormal(Widget w)
void ColorHighlight(Widget w)
void OnDLCChange(EDLCId dlcId)
IntroSceneCharacter GetIntroCharacter()
static JsonDataDLCList GetData()
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
int ARGB(int a, int r, int g, int b)