3 protected ButtonWidget m_OkButton;
4 protected MultilineTextWidget m_Description;
10 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
12 GetGame().GetMission().GetHud().ShowHudUI(
false);
13 GetGame().GetMission().GetHud().ShowQuickbarUI(
false);
21 GetGame().GetMission().RemoveActiveInputExcludes({
"menu"},
true);
23 GetGame().GetMission().GetHud().ShowHudUI(
true);
24 GetGame().GetMission().GetHud().ShowQuickbarUI(
true);
26 GetGame().GetMission().GetOnInputPresetChanged().Remove(OnInputPresetChanged);
27 GetGame().GetMission().GetOnInputDeviceChanged().Remove(OnInputDeviceChanged);
33 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/day_z_dropped_items.layout");
34 m_OkButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"bOK"));
35 m_Description = MultilineTextWidget.Cast(layoutRoot.FindAnyWidget(
"txtDescription"));
38 string text =
Widget.TranslateString(GetText());
43 GetGame().GetMission().GetOnInputPresetChanged().Insert(OnInputPresetChanged);
44 GetGame().GetMission().GetOnInputDeviceChanged().Insert(OnInputDeviceChanged);
57 override bool OnClick(
Widget w,
int x,
int y,
int button)
59 super.OnClick(w,
x,
y, button);
61 if (w.GetUserID() ==
IDC_OK)
70 override void Update(
float timeslice)
72 super.Update(timeslice);
74 #ifdef PLATFORM_CONSOLE
75 if (
GetUApi().GetInputByID(UAUISelect).LocalPress())
80 protected void OnInputPresetChanged()
82 #ifdef PLATFORM_CONSOLE
83 UpdateControlsElements();
89 UpdateControlsElements();
90 UpdateControlsElementVisibility();
93 protected void UpdateControlsElements()
96 string context =
string.Format(
" %1",
InputUtils.GetRichtextButtonIconFromInputAction(
"UAUISelect",
"#early_access_alpha_understand", EUAINPUT_DEVICE_CONTROLLER,
InputUtils.ICON_SCALE_TOOLBAR));
98 toolbarText.SetText(context);
101 protected void UpdateControlsElementVisibility()
103 bool toolbarShow =
false;
104 #ifdef PLATFORM_CONSOLE
108 layoutRoot.FindAnyWidget(
"BottomConsoleToolbar").Show(toolbarShow);
117 return "#str_item_drop_notification";
123 override string GetText()
125 return "#str_position_change_notification";