Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_KeyBindingMenuConfig.c
Go to the documentation of this file.
1/*
2Configuration of keybindings visible in the keybindings menu.
3*/
5//------------------------------------------------------------------------------------------------
6
8[BaseContainerProps(configRoot: true)]
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
24class SCR_KeyBindingEntryTitleField : BaseContainerCustomTitleField
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")]
60class 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 [Attribute(uiwidget: UIWidgets.SearchComboBox, desc: "Displayed only on specified platforms if defined", enums: ParamEnumArray.FromEnum(EPlatform))]
81 ref array<EPlatform> m_aPlatforms;
82};
83
84[BaseContainerProps("", "Category of key bindings"), BaseContainerCustomTitleField("m_sName")]
86{
87 [Attribute("", UIWidgets.EditBox, "Technical name of the category")]
88 string m_sName;
89
90 [Attribute("", UIWidgets.LocaleEditBox, "Visible name of the category")]
91 LocalizedString m_sDisplayName;
92
93 [Attribute("", UIWidgets.Object, "Description", "")]
94 ref array<ref SCR_KeyBindingEntry> m_KeyBindingEntries;
95};
96
97[BaseContainerProps("", "Input filters"), BaseContainerCustomTitleField("m_sFilterString")]
99{
100 [Attribute("", UIWidgets.Auto, "Name of the filter use the same name as defined in enfusion", "")]
101 string m_sFilterString;
102
103 [Attribute("", UIWidgets.Auto, "Display name of filter", "")]
104 string m_sFilterDisplayName;
105
106 [Attribute("0", UIWidgets.ComboBox, "PrefixType", "", ParamEnumArray.FromEnum(SCR_EActionPrefixType))]
107 SCR_EActionPrefixType m_eFilterType;
108
109 //------------------------------------------------------------------------------------------------
110 SCR_EActionPrefixType GetFilterType()
111 {
112 return m_eFilterType;
113 }
114}
115
116[BaseContainerProps("", "Custom keybinds"), BaseContainerCustomTitleField("m_sBindString")]
117class SCR_KeyBindingBind
118{
119 [Attribute("", UIWidgets.Auto, "Name of the bind use the same name as defined in enfusion", "")]
120 string m_sBindString;
121
122 [Attribute("", UIWidgets.Auto, "Display name of bind", "")]
123 string m_sBindDisplayName;
124}
125
126[BaseContainerProps("", "Custom bindable combo keys"), BaseContainerCustomTitleField("m_sComboString")]
128{
129 [Attribute("", UIWidgets.Auto, "Name of the combo bind, for instance keyboard:KC_LCONTROL", "")]
130 string m_sComboString;
131
132 [Attribute("", UIWidgets.Auto, "Display name of combo", "")]
133 string m_sComboDisplayName;
134}
135
136enum SCR_EActionPrefixType
137{
140 AMBIGUOUS
141}
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
SCR_KeyBindingEntryTitleField BaseContainerCustomTitleField SCR_KeyBindingEntryTitleField("m_sActionName")
class SCR_KeyBindingCombo CONTINUOUS
class SCR_KeyBindingCombo NON_CONTINUOUS
SCR_EActionPrefixType GetFilterType()
class SCR_KeyBindingCategory BaseContainerProps
string m_sActionName
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_FieldOfViewSettings Attribute
EPlatform
Definition EPlatform.c:13