6 protected static const string ACTION_ROW_LAYOUT_PATH =
"{75B1F7B766CA8C91}UI/layouts/Menus/SettingsMenu/BindingMenu/KeybindRow.layout";
7 protected static const string SEPARATOR_LAYOUT_PATH =
"{01D9FD7791700ADA}UI/layouts/Menus/SettingsMenu/BindingMenu/KeybindSeparator.layout";
8 protected static const string DESCRIPTION_ACTION_ROW_LAYOUT_PATH =
"{929E92CB72FBE8DD}UI/layouts/Menus/SettingsMenu/BindingMenu/KeybindsSettingsDescriptionActionRow.layout";
9 protected static const string KEY_BINDING_CONFIG =
"{4EE7794C9A3F11EF}Configs/System/keyBindingMenu.conf";
54 protected const string DESCRIPTION =
"#AR-Settings_Keybind_DetailsPanel_Description";
66 super.OnTabCreate(menuRoot, buttonsLayout,
index);
93 string action =
string.Format(
94 "<action name='%1', scale='%2', state = '%3'/>",
97 UIConstants.GetActionDisplayStateAttribute(SCR_EActionDisplayState.NON_INTERACTABLE_HINT)
112 if (ps && ps.GetLocalPlatformKind() ==
PlatformKind.PSN)
122 BaseContainer container = holder.GetResource().ToBaseContainer();
132 super.OnMenuUpdate(tDelta);
171 super.OnMenuFocusGained();
183 super.OnMenuFocusLost();
207 bool firstSeparator =
true;
227 row.RemoveFromHierarchy();
240 foreach (SCR_KeyBindingEntry entry :
category.m_KeyBindingEntries)
243 if (!entry.m_aPlatforms.IsEmpty() && !entry.m_aPlatforms.Contains(platform))
247 if (entry.m_sActionName !=
"separator")
279 separatorText.
SetVisible(!entry.m_sDisplayName.IsEmpty());
280 separatorText.
SetText(entry.m_sDisplayName);
289 keybindTitle = rowWidget.FindAnyWidget(
"Keybind");
293 gamepadTitle = rowWidget.FindAnyWidget(
"Gamepad");
295 gamepadTitle.SetVisible(
true);
299 firstSeparator =
false;
338 GetGame().GetWorkspace().SetFocusedWidget(w);
351 if (!spinBoxComponent)
390 EInputDeviceType device =
GetGame().GetInputManager().GetLastUsedInputDevice();
476 bool consoleController =
GetGame().IsPlatformGameConsole() && !
GetGame().GetHasKeyboard();
477 bool usingMouse =
GetGame().GetInputManager().GetLastUsedInputDevice() == EInputDeviceType.MOUSE;
478 bool usingKeyboard =
GetGame().GetInputManager().GetLastUsedInputDevice() == EInputDeviceType.KEYBOARD;
510 EInputDeviceType device =
GetGame().GetInputManager().GetLastUsedInputDevice();
511 if (device != EInputDeviceType.GAMEPAD)
512 device = EInputDeviceType.KEYBOARD;
541 for (
int i = 0; i < bindCount; i++)
572 Widget root = row.GetRootWidget();
SCR_SettingsManager GetSettingsManager()
bool IsPlatformGameConsole()
ArmaReforgerScripted GetGame()
InputManager GetInputManager()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
ESettingManagerModuleType
Object holding reference to resource. In destructor release the resource.
static SCR_AdvancedActionRowComponent FindComponentInHierarchy(notnull Widget w)
void Init(string actionName, string actionPreset, int index, SCR_SettingsManagerKeybindModule settingsKeybindModule, EInputDeviceType device)
ref ScriptInvoker m_OnConfirm
static SCR_ConfigurableDialogUi CreateKeybindsResetDialog()
static SCR_AdvancedKeybindDialogUI CreateAdvancedKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, string actionPreset, SCR_EActionPrefixType prefixType)
static const string BUTTON_RESET
ScriptInvokerString GetOnInlineButton()
ScriptInvokerVoid GetOnKeyCaptured()
static const string BUTTON_ADVANCED_KEYBIND
ScriptInvokerScriptedWidgetComponent GetOnFocusLost()
static SCR_KeybindRowComponent FindComponent(Widget w)
ScriptInvokerScriptedWidgetComponent GetOnFocus()
static const string BUTTON_UNBIND
void Init(notnull InputBinding binding, SCR_KeyBindingEntry entry)
override void OnTabHide()
SCR_InputButtonComponent m_ResetSingleButton
static const string ACTION_ROW_LAYOUT_PATH
ScrollLayoutWidget m_wActionsScrollLayout
ScrollLayoutWidget m_wDescriptionScroll
SCR_SpinBoxComponent m_CategoriesSpinBox
void OnRowFocusLost(SCR_ScriptedWidgetComponent component)
override void OnMenuUpdate(float tDelta)
void OnRowFocus(SCR_ScriptedWidgetComponent component)
void InsertCategoriesToComboBox()
void UnbindSingleAction()
const string DESCRIPTION_ADVANCED_BINDINGS
ref array< SCR_InputButtonComponent > m_aRowFooterButtons
ref array< Widget > m_aRowWidgets
RichTextWidget m_wDescriptionNL
void CreateSimpleBindingButton()
SCR_KeybindRowComponent m_SelectedRowComponent
static const string SEPARATOR_LAYOUT_PATH
SCR_SettingsManagerKeybindModule m_SettingsKeybindModule
static const string KEY_BINDING_CONFIG
ref SCR_KeyBindingMenuConfig m_KeybindConfig
override void OnMenuShow()
SCR_MenuActionsComponent m_ActionsComponent
ref InputBinding m_Binding
const float FIRST_SEPARATOR_PADDING
TextWidget m_wDescriptionHeader
SCR_InputButtonComponent m_CalibrateMCButton
void CreateUnbindSingleButton()
override void OnMenuFocusGained()
SCR_InputButtonComponent m_ResetAllButton
VerticalLayoutWidget m_wActionsLayout
void OnInputDeviceChange(EInputDeviceType oldDevice, EInputDeviceType newDevice)
static const string ACTION_RESET_ALL
void CreateAdvancedBindingButton()
override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout, int index)
void ResetKeybindsToDefaultConfirm()
void CreateResetAllKeybindsButton()
static const string ACTION_CALIBRATE_MC
void CreateCalibrateGyroButton()
static const string ACTION_RESET_SINGLE
void CreateSingleKeybindResetButton()
void ResetSingleKeybindToDefault()
static const string PRIMARY_PRESET_PREFIX
override void OnTabShow()
RichTextWidget m_wDescription
void UpdateListSelectionDisplay(int index)
Widget m_wDescriptionActionRowsContainer
void ListActionsFromCurrentCategory()
void UpdateFocusedWidget(Widget w)
SCR_InputButtonComponent m_SimpleBindingButton
void AdvancedKeybindButtonClick()
void OnActionTriggered(string name, float multiplier)
static const string ACTION_UNBIND
int m_iLastSelectedRowIndex
SCR_InputButtonComponent m_AdvancedBindingButton
SCR_InputButtonComponent m_UnbindSingleActionButton
ref array< Widget > m_aDescriptionActionRows
static const string DESCRIPTION_ACTION_ROW_LAYOUT_PATH
void ResetKeybindsToDefault()
override void OnMenuFocusLost()
void CalibrateMotionControl()
static const string ACTION_ADVANCED_KEYBIND
void OnRowInlineButton(string name)
void SetText(string text)
void SetVisible(bool visible)
static SCR_LabelComponent GetComponent(string name, Widget parent, bool searchAllChildren=true)
void SetTopPadding(float padding)
override bool SetCurrentItem(int i, bool playSound=false, bool animate=false)
override int AddItem(string item, bool last=false, Managed data=null)