4 private TextWidget m_LogoutTimeText;
8 #ifdef PLATFORM_CONSOLE
9 private ButtonWidget m_bCancelConsole;
19 g_Game.SetKeyboardHandle(
this);
26 g_Game.SetKeyboardHandle(null);
33 if (player && player.GetEmoteManager())
35 player.GetEmoteManager().SetClientLoggingOut(
false);
38 #ifdef PLATFORM_CONSOLE
48 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_logout_dialog.layout");
52 m_bLogoutNow = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bLogoutNow"));
53 m_bCancel = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bCancel"));
55 #ifdef PLATFORM_CONSOLE
56 m_bCancelConsole = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bCancelConsole"));
62 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
69 if (player.GetEmoteManager() && !player.IsRestrained() && !player.IsUnconscious())
71 player.GetEmoteManager().SetClientLoggingOut(
true);
74 #ifdef PLATFORM_CONSOLE
89 layoutRoot.Show(
true);
95 layoutRoot.Show(
false);
100 super.OnClick(w,
x,
y, button);
104 g_Game.GetMission().AbortMission();
108 #ifdef PLATFORM_CONSOLE
109 else if (w == m_bCancelConsole)
124 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
139 string text =
"#layout_logout_dialog_until_logout_";
141 TimeConversions.ConvertSecondsToFullTime(time,
m_FullTime);
152 text =
Widget.TranslateString(text);
173 if (player.IsRestrained() || player.IsUnconscious())
188 g_Game.GetMission().Continue();
194 g_Game.GetMission().AbortMission();
207 g_Game.GetMission().Continue();
211 g_Game.LogoutRequestCancel();
214 #ifdef PLATFORM_CONSOLE
222 bool toolbarShow =
false;
223 toolbarShow = !
g_Game.GetInput().IsEnabledMouseAndKeyboard() ||
g_Game.GetInput().GetCurrentInputDevice() ==
EInputDeviceType.CONTROLLER;
224 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
225 m_bCancelConsole.Show(!toolbarShow);
229 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget(
"BackIcon"));
230 toolbar_b.SetText(InputUtils.GetRichtextButtonIconFromInputAction(
"UAUIBack",
"", EUAINPUT_DEVICE_CONTROLLER, InputUtils.ICON_SCALE_TOOLBAR));
struct that keeps Time relevant information for future formatting
static proto string Format(string fmt, 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)
Gets n-th character from string.