4 private TextWidget m_LogoutTimeText;
8 #ifdef PLATFORM_CONSOLE
18 g_Game.SetKeyboardHandle(
this);
25 g_Game.SetKeyboardHandle(null);
32 if (player && player.GetEmoteManager())
34 player.GetEmoteManager().SetClientLoggingOut(
false);
37 #ifdef PLATFORM_CONSOLE
47 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/day_z_logout_dialog.layout");
51 m_bLogoutNow = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bLogoutNow"));
52 m_bCancel = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bCancel"));
54 #ifdef PLATFORM_CONSOLE
55 m_bCancelConsole = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bCancelConsole"));
61 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
68 if (player.GetEmoteManager() && !player.IsRestrained() && !player.IsUnconscious())
70 player.GetEmoteManager().SetClientLoggingOut(
true);
73 #ifdef PLATFORM_CONSOLE
88 layoutRoot.Show(
true);
94 layoutRoot.Show(
false);
99 super.OnClick(w,
x,
y, button);
103 g_Game.GetMission().AbortMission();
107 #ifdef PLATFORM_CONSOLE
123 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
138 string text =
"#layout_logout_dialog_until_logout_";
140 TimeConversions.ConvertSecondsToFullTime(time,
m_FullTime);
151 text =
Widget.TranslateString(text);
172 if (player.IsRestrained() || player.IsUnconscious())
187 g_Game.GetMission().Continue();
193 g_Game.GetMission().AbortMission();
198 g_Game.GetMission().Continue();
202 g_Game.LogoutRequestCancel();
205 #ifdef PLATFORM_CONSOLE
213 bool toolbarShow =
false;
214 toolbarShow = !
g_Game.GetInput().IsEnabledMouseAndKeyboard() ||
g_Game.GetInput().GetCurrentInputDevice() ==
EInputDeviceType.CONTROLLER;
215 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
216 m_bCancelConsole.Show(!toolbarShow);
220 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget(
"BackIcon"));
221 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.