7 #ifdef PLATFORM_CONSOLE
9 protected Widget m_ConsoleToolbar;
16 #ifdef PLATFORM_CONSOLE
26 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/day_z_connection_dialogue.layout");
27 m_DisconnectBtn = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"DCButton"));
28 #ifdef PLATFORM_CONSOLE
29 m_DisconnectBtnLabel =
RichTextWidget.Cast(layoutRoot.FindAnyWidget(
"DCButtonLabel"));
30 m_ConsoleToolbar = layoutRoot.FindAnyWidget(
"ConsoleToolbar");
33 #ifdef PLATFORM_CONSOLE
42 toolbar_text.SetText(context);
44 #ifdef PLATFORM_CONSOLE
51 #ifdef PLATFORM_CONSOLE
54 switch (pInputDeviceType)
58 GetGame().GetUIManager().ShowUICursor(
false);
59 m_DisconnectBtnLabel.SetText(
"#main_menu_exit");
60 SetFocus(m_DisconnectBtn);
65 if (
GetGame().GetInput().IsEnabledMouseAndKeyboard())
67 GetGame().GetUIManager().ShowUICursor(
true);
80 bool toolbarShow = !
GetGame().GetInput().IsEnabledMouseAndKeyboard() ||
GetGame().GetInput().GetCurrentInputDevice() ==
EInputDeviceType.CONTROLLER;
81 m_ConsoleToolbar.Show(toolbarShow);
84 override bool OnFocus(Widget w,
int x,
int y)
86 if (w == m_DisconnectBtn)
88 m_DisconnectBtn.SetColor(
ARGB(255, 255, 0, 0));
96 if (w == m_DisconnectBtn)
98 m_DisconnectBtn.SetColor(
ARGB(0, 0, 0, 0));
105 override bool OnClick(Widget w,
int x,
int y,
int button)
107 super.OnClick(w,
x,
y, button);
109 if (w == m_DisconnectBtn)
119 if (w == m_DisconnectBtn)
121 m_DisconnectBtn.SetColor(
ARGB(255, 255, 0, 0));
129 if (w == m_DisconnectBtn)
131 m_DisconnectBtn.SetColor(
ARGB(0, 0, 0, 0));
142 PPERequesterBank.GetRequester(PPERequester_LatencyBlur).Start();
143 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission());
146 mission.GetHud().ShowHud(
false);
147 mission.GetHud().ShowQuickBar(
false);
148 mission.AddActiveInputExcludes({
"menu"});
149 mission.AddActiveInputRestriction(EInputRestrictors.INVENTORY);
150 GetUApi().SupressNextFrame(
true);
156 m_DebugMonitorHidden =
true;
174 PPERequesterBank.GetRequester(PPERequester_LatencyBlur).Stop();
175 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission());
179 mission.RemoveActiveInputExcludes({
"menu"},
true);
180 mission.RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
181 mission.GetHud().ShowHud(
true);
182 mission.GetHud().ShowQuickBar(
true);
185 if (m_DebugMonitorHidden)
191 m_DebugMonitorHidden =
false;
207 #ifdef PLATFORM_CONSOLE
208 if (
GetUApi().GetInputByID(UAUISelect).LocalValue())
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
static void SetMultiplayState(bool state)
proto native CGame GetGame()
int ARGB(int a, int r, int g, int b)