3enum EConsoleButtonsControls
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;
60 PPERequesterBank.GetRequester(PPERequesterBank.REQ_MENUEFFECTS).Stop();
65 #ifdef PLATFORM_CONSOLE
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);
106 m_CurrentTabIdx = tab_index;
114 m_CanvasWidget.Clear();
122 wid_side = m_VariantWidget.GetChildren();
123 typename t = EConsoleButtonsControls;
133 side_idx = wid_side.GetUserID();
134 wid_spacer = wid_side.GetChildren();
140 t.GetVariableValue(null, i, enum_value);
145 button_mapping.Insert(enum_value,items_filtered);
157 m_AreasLR.Insert(side_idx,button_mapping);
159 wid_side = wid_side.GetSibling();
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"));
411 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"back"));
417 PPERequester_MenuEffects requester;
418 Class.
CastTo(requester,PPERequesterBank.GetRequester(PPERequesterBank.REQ_MENUEFFECTS));
419 requester.SetVignetteIntensity(0.6);
495 return (w && w ==
m_Back);
500 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
505 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
510 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
515 if (
GetUApi().GetInputByID(UASwitchPreset).LocalPress())
526 if (m_CategoryStructure)
528 m_CategoryStructure = null;
532 if (m_ImageMarkerStructure)
534 m_ImageMarkerStructure = null;
538 Widget w = m_ControlsImage.GetChildren();
539 m_ImageMarkerStructure.Set(w.GetUserID(),w);
541 while (w.GetSibling())
544 m_ImageMarkerStructure.Set(w.GetUserID(),w);
550 m_PlatformHolder =
FindChildByID(layoutRoot,PLATFORM_ADJUST_X1);
552 m_PlatformHolder =
FindChildByID(layoutRoot,PLATFORM_ADJUST_PS);
556 Widget category_widget = m_PlatformHolder.GetChildren();
557 m_CategoryStructure.Set(category_widget.GetUserID(),category_widget);
559 while (category_widget.GetSibling())
561 category_widget = category_widget.GetSibling();
562 m_CategoryStructure.Set(category_widget.GetUserID(),category_widget);
584 #ifdef PLATFORM_WINDOWS
604 m_NextPresetText = inputAPI.
PresetName(target_idx);
607 m_NextPresetText =
"#STR_UAPRESET_ChangeTo_0";
611 m_NextPresetText =
"#STR_UAPRESET_ChangeTo_1";
622 Widget ret = wid.GetChildren();
625 if (ret.GetUserID() == user_id)
629 ret = ret.GetSibling();
637 Widget child = wid.GetChildren();
640 if (child.GetUserID() == user_id)
642 results.Insert(child);
644 child = child.GetSibling();
646 return (results && results.Count() > 0);
652 for (
int i = 0; i < input.Count(); i++)
656 filtered.Insert(input[i]);
660 return filtered.Count();
668 int color_pnl =
ARGB(255, 0, 0, 0);
669 int color_lbl =
ARGB(255, 255, 0, 0);
671 #ifdef PLATFORM_CONSOLE
672 color_pnl =
ARGB(255, 200, 0, 0);
673 color_lbl =
ARGB(255, 255, 255, 255);
685 int color_pnl =
ARGB(0, 0, 0, 0);
686 int color_lbl =
ARGB(255, 255, 255, 255);
711 Widget panel = w.FindWidget(w.GetName() +
"_panel");
715 panel.SetColor(color);
730 label.SetColor(color);
735 text.SetColor(color);
740 text2.SetColor(color);
751 toolbar_text.SetText(text);
759 bool toolbarShow =
false;
760 #ifdef PLATFORM_CONSOLE
764 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(toolbarShow);
765 layoutRoot.FindAnyWidget(
"play_panel_root").Show(!toolbarShow);
protected void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
protected void OnInputPresetChanged()
protected ButtonWidget m_Back
protected TabberUI m_TabScript
enum map TButtonPairingInfo
@ BUTTON_GROUP_PAD_COMMON
@ BUTTON_GROUP_RIGHT_SIDE_COMMON
proto native Mission GetMission()
proto native Input GetInput()
proto native UIManager GetUIManager()
proto native WorkspaceWidget GetWorkspace()
Super root of all classes in Enforce script.
ScriptInvoker GetOnInputPresetChanged()
ScriptInvoker GetOnInputDeviceChanged()
proto void Invoke(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)
invoke call on all inserted methods with given arguments
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
bool Back()
Close top window on windows stack, returns true when any window is closed.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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)