Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_KeyBindingMenuConfig.c
Go to the documentation of this file.
1 /*
2 Configuration of keybindings visible in the keybindings menu.
3 */
4 
5 //------------------------------------------------------------------------------------------------
6 
7 
8 [BaseContainerProps(configRoot: true)]
9 class SCR_KeyBindingMenuConfig : Managed
10 {
11  [Attribute("", UIWidgets.Object, "Description", "")]
12  ref array<ref SCR_KeyBindingCategory> m_KeyBindingCategories;
13 
14  [Attribute("", UIWidgets.Object, "Input filters available", "")]
15  ref array<ref SCR_KeyBindingFilter> m_aInputFilters;
16 
17  [Attribute("", UIWidgets.Object, "Addition binds able to be manually bound", "")]
18  ref array<ref SCR_KeyBindingBind> m_aInputBinds;
19 
20  [Attribute("", UIWidgets.Object, "Keys that are available to be bound as combos i.e.: Ctrl, Shift", "")]
21  ref array<ref SCR_KeyBindingCombo> m_aComboKeys;
22 };
23 
25 {
26  //------------------------------------------------------------------------------------------------
27  override bool _WB_GetCustomTitle(BaseContainer source, out string title)
28  {
29  // Make sure variable exists
30  int index = source.GetVarIndex("m_sActionName");
31  if (index == -1)
32  return false;
33 
34  // Tag string
35  source.Get("m_sActionName", title);
36  if (title == "separator")
37  {
38  title = "= ";
39  LocalizedString name = "";
40  source.Get("m_sDisplayName", name);
41  title += name;
42  }
43  else
44  {
45  title = " - " + title;
46  }
47 
48  string preset = "";
49  source.Get("m_sPreset", preset);
50 
51  // Setup title string
52  if (!preset.IsEmpty())
53  title += " (" + preset + ")";
54 
55  return true;
56  }
57 }
58 
59 [BaseContainerProps("", "Entry of one key binding"), SCR_KeyBindingEntryTitleField("m_sActionName")]
60 class SCR_KeyBindingEntry
61 {
62  [Attribute("", UIWidgets.EditBox, "Action name as defined in the ActionManager config")]
63  string m_sActionName;
64 
65  [Attribute("", UIWidgets.EditBox, "Name of gamepad action to be used instead of main one, for instance Aim has separate action for controller")]
66  string m_sActionNameGamepadOptional;
67 
68  [Attribute("", UIWidgets.LocaleEditBox, "Visible name of the action, long texts are not supported, name shouldn't be over 15 characters ")]
70 
71  [Attribute("", UIWidgets.EditBox, "Show only Action sources with this preset.\nUsed for example when multiple directions are mapped to one action, like moving forward with value +1 and backward with value -1.")]
72  string m_sPreset;
73 
74  [Attribute("", UIWidgets.EditBox, "Same as the Preset above, but this one should be filled only if it differs for the gamepad optional action.")]
75  string m_sPresetGamepadOptional;
76 
77  [Attribute(SCR_Enum.GetDefault(SCR_EActionPrefixType.NON_CONTINUOUS), UIWidgets.ComboBox, "Type of prefix that can be applied to this action", "", ParamEnumArray.FromEnum(SCR_EActionPrefixType))]
78  SCR_EActionPrefixType m_ePrefixType;
79 };
80 
81 [BaseContainerProps("", "Category of key bindings"), BaseContainerCustomTitleField("m_sName")]
83 {
84  [Attribute("", UIWidgets.EditBox, "Technical name of the category")]
85  string m_sName;
86 
87  [Attribute("", UIWidgets.LocaleEditBox, "Visible name of the category")]
88  LocalizedString m_sDisplayName;
89 
90  [Attribute("", UIWidgets.Object, "Description", "")]
91  ref array<ref SCR_KeyBindingEntry> m_KeyBindingEntries;
92 };
93 
94 [BaseContainerProps("", "Input filters"), BaseContainerCustomTitleField("m_sFilterString")]
96 {
97  [Attribute("", UIWidgets.Auto, "Name of the filter use the same name as defined in enfusion", "")]
98  string m_sFilterString;
99 
100  [Attribute("", UIWidgets.Auto, "Display name of filter", "")]
101  string m_sFilterDisplayName;
102 
103  [Attribute("0", UIWidgets.ComboBox, "PrefixType", "", ParamEnumArray.FromEnum(SCR_EActionPrefixType))]
104  SCR_EActionPrefixType m_eFilterType;
105 
106  //------------------------------------------------------------------------------------------------
107  SCR_EActionPrefixType GetFilterType()
108  {
109  return m_eFilterType;
110  }
111 }
112 
113 [BaseContainerProps("", "Custom keybinds"), BaseContainerCustomTitleField("m_sBindString")]
114 class SCR_KeyBindingBind
115 {
116  [Attribute("", UIWidgets.Auto, "Name of the bind use the same name as defined in enfusion", "")]
117  string m_sBindString;
118 
119  [Attribute("", UIWidgets.Auto, "Display name of bind", "")]
120  string m_sBindDisplayName;
121 }
122 
123 [BaseContainerProps("", "Custom bindable combo keys"), BaseContainerCustomTitleField("m_sComboString")]
125 {
126  [Attribute("", UIWidgets.Auto, "Name of the combo bind, for instance keyboard:KC_LCONTROL", "")]
127  string m_sComboString;
128 
129  [Attribute("", UIWidgets.Auto, "Display name of combo", "")]
130  string m_sComboDisplayName;
131 }
132 
133 enum SCR_EActionPrefixType
134 {
136  CONTINUOUS
137 }
SCR_KeyBindingEntryTitleField
SCR_KeyBindingEntryTitleField BaseContainerCustomTitleField SCR_KeyBindingEntryTitleField("m_sActionName")
Definition: SCR_KeyBindingMenuConfig.c:59
m_sDisplayName
protected string m_sDisplayName
Definition: SCR_KeybindDialogs.c:39
SCR_Enum
Definition: SCR_Enum.c:1
m_eFilterType
SCR_EActionPrefixType m_eFilterType
Definition: SCR_KeyBindingMenuConfig.c:67
m_sActionName
protected string m_sActionName
Definition: SCR_ActionsRadialMenuEditorComponent.c:24
NON_CONTINUOUS
class SCR_KeyBindingCombo NON_CONTINUOUS
SCR_KeyBindingCombo
Definition: SCR_KeyBindingMenuConfig.c:124
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition: SCR_KeyBindingMenuConfig.c:113
Attribute
typedef Attribute
Post-process effect of scripted camera.
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
SCR_KeyBindingCategory
Definition: SCR_KeyBindingMenuConfig.c:82
BaseContainerProps
class SCR_KeyBindingCategory BaseContainerProps
CONTINUOUS
SCR_SettingBindingEngine CONTINUOUS
LocalizedString
Definition: LocalizedString.c:21
SCR_KeyBindingMenuConfig
Definition: SCR_KeyBindingMenuConfig.c:9
SCR_KeyBindingEntryTitleField
Definition: SCR_KeyBindingMenuConfig.c:24
SCR_KeyBindingFilter
Definition: SCR_KeyBindingMenuConfig.c:95