32 protected int m_CurrentTabIdx = -1;
33 protected int m_CurrentPresetVariant = -1;
50 protected const int AREA_LEFT = 1;
51 protected const int AREA_RIGHT = 2;
52 protected const int PLATFORM_ADJUST_X1 = 1000;
53 protected const int PLATFORM_ADJUST_PS = 2000;
65#ifdef PLATFORM_CONSOLE
78 GetGame().GetUIManager().Back();
85 if (m_CurrentTabIdx != -1)
87 m_VariantWidget.Show(
false);
88 while (m_VariantWidget.GetParent())
90 m_VariantWidget = m_VariantWidget.GetParent();
91 m_VariantWidget.Show(
false);
114 m_CanvasWidget.Clear();
122 wid_side = m_VariantWidget.GetChildren();
398 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/xbox/Controls_Screen.layout");
400 m_ControlsImage = layoutRoot.FindAnyWidget(
"XboxControlsImage");
403 m_ControlsImage = layoutRoot.FindAnyWidget(
"PSControlsImage");
406 m_ControlsImage.Show(
true);
407 m_TabberWidget = layoutRoot.FindAnyWidget(
"Tabber");
409 m_TabScript.m_OnTabSwitch.Insert(UpdateTabContent);
410 m_CanvasWidget =
CanvasWidget.Cast(layoutRoot.FindAnyWidget(
"CanvasUniversal"));
511 PerformSwitchPreset();
512 UpdateTabContent(m_CurrentTabIdx);
520 if (m_CategoryStructure)
522 m_CategoryStructure =
null;
526 if (m_ImageMarkerStructure)
528 m_ImageMarkerStructure =
null;
532 Widget w = m_ControlsImage.GetChildren();
533 m_ImageMarkerStructure.Set(
w.GetUserID(),
w);
535 while (
w.GetSibling())
538 m_ImageMarkerStructure.Set(
w.GetUserID(),
w);
544 m_PlatformHolder = FindChildByID(layoutRoot, PLATFORM_ADJUST_X1);
546 m_PlatformHolder = FindChildByID(layoutRoot, PLATFORM_ADJUST_PS);
574 GetGame().GetMission().GetOnInputPresetChanged().Invoke();
576#ifdef PLATFORM_WINDOWS
579 GetUApi().SaveInputPresetMiscData();
596 m_NextPresetText =
"#STR_UAPRESET_ChangeTo_0";
598 m_NextPresetText =
"#STR_UAPRESET_ChangeTo_1";
600 m_NextPresetText =
"Invalid console preset name: " + m_NextPresetText;
632 for (
int i = 0;
i <
input.Count();
i++)
649#ifdef PLATFORM_CONSOLE
728#ifdef PLATFORM_CONSOLE
732 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
toolbarShow);
733 layoutRoot.FindAnyWidget(
"play_panel_root").Show(!
toolbarShow);
void OnInputPresetChanged()
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
void DrawConnectingLines(int index)
enum map TButtonPairingInfo
@ BUTTON_GROUP_PAD_COMMON
@ BUTTON_GROUP_RIGHT_SIDE_COMMON
void ColorNormal(Widget w)
bool IsFocusable(Widget w)
void ColorHighlight(Widget w)
Super root of all classes in Enforce script.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
int ARGB(int a, int r, int g, int b)