Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_KeybindDialogs.c
Go to the documentation of this file.
2 {
3  protected static const string DIALOGS_CONFIG = "{A24DA5B329261CB7}Configs/Dialogs/KeybindDialogs.conf";
4 
5  //---------------------------------------------------------------------------------------------
6  static SCR_ConfigurableDialogUi CreateKeybindsResetDialog()
7  {
8  return SCR_ConfigurableDialogUi.CreateFromPreset(DIALOGS_CONFIG, "reset_keybinds");
9  }
10 
11  //------------------------------------------------------------------------------------------------
12  static SCR_SimpleKeybindDialogUI CreateSimpleKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, InputBinding binding, EInputDeviceType device, bool showOverrideWarning = true)
13  {
14  string tag = "simple_keybind";
15  if (device == EInputDeviceType.GAMEPAD)
16  tag = "simple_keybind_gamepad";
17 
18  SCR_SimpleKeybindDialogUI dialog = new SCR_SimpleKeybindDialogUI(entry, displayName, actionName, binding, device, showOverrideWarning);
19  SCR_ConfigurableDialogUi.CreateFromPreset(DIALOGS_CONFIG, tag, dialog);
20 
21  return dialog;
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  static SCR_AdvancedKeybindDialogUI CreateAdvancedKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, string actionPreset, SCR_EActionPrefixType prefixType)
26  {
27  SCR_AdvancedKeybindDialogUI dialog = new SCR_AdvancedKeybindDialogUI(entry, displayName, actionName, actionPreset, prefixType);
28  SCR_ConfigurableDialogUi.CreateFromPreset(DIALOGS_CONFIG, "advanced_keybind", dialog);
29 
30  return dialog;
31  }
32 }
33 
34 //------------------------------------------------------------------------------------------------
35 class SCR_KeybindDialogBase : SCR_ConfigurableDialogUi
36 {
37  protected SCR_KeyBindingEntry m_Entry;
38  protected string m_sActionName;
39  protected string m_sDisplayName;
40 
41  protected EInputDeviceType m_eDevice;
42 
44 
45  //-----------------------------------------------------------------------------------------------
46  protected void Setup(SCR_KeyBindingEntry entry, string displayName, string actionName, EInputDeviceType device)
47  {
48  m_Entry = entry;
49 
50  m_sDisplayName = displayName;
51  m_sActionName = actionName;
52  m_eDevice = device;
53 
56  {
57  Print("SCR_KeybindDialogBase::Keybind module for settings manager not found!", LogLevel.WARNING);
58  return;
59  }
60  }
61 }
m_sDisplayName
protected string m_sDisplayName
Definition: SCR_KeybindDialogs.c:39
m_Entry
class SCR_KeybindDialogs m_Entry
m_SettingsKeybindModule
protected SCR_SettingsManagerKeybindModule m_SettingsKeybindModule
Definition: SCR_KeybindDialogs.c:43
Setup
protected void Setup(SCR_KeyBindingEntry entry, string displayName, string actionName, EInputDeviceType device)
Definition: SCR_KeybindDialogs.c:46
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_SettingsManagerKeybindModule
Definition: SCR_SettingsManagerKeybindModule.c:2
m_sActionName
protected string m_sActionName
Definition: SCR_KeybindDialogs.c:38
SCR_KeybindDialogs
Definition: SCR_KeybindDialogs.c:1
SCR_SimpleKeybindDialogUI
Definition: SCR_SimpleKeybindDialogUI.c:2
m_eDevice
protected EInputDeviceType m_eDevice
Definition: SCR_KeybindDialogs.c:41
SCR_AdvancedKeybindDialogUI
Definition: SCR_AdvancedKeybindDialogUI.c:2
SCR_ConfigurableDialogUi
Definition: SCR_ConfigurableDialogUI.c:13
GetSettingsManager
SCR_SettingsManager GetSettingsManager()
Definition: game.c:191
ESettingManagerModuleType
ESettingManagerModuleType
Definition: SCR_SettingsManager.c:2