Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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 //---------------------------------------------------------------------------------------------
7 {
8 if (System.GetPlatform() == EPlatform.PS4 || System.GetPlatform() == EPlatform.PS5 || System.GetPlatform() == EPlatform.PS5_PRO)
10
12 }
13
14 //------------------------------------------------------------------------------------------------
15 static SCR_SimpleKeybindDialogUI CreateSimpleKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, InputBinding binding, EInputDeviceType device, bool showOverrideWarning = true)
16 {
17 string tag = "simple_keybind";
18 if (device == EInputDeviceType.GAMEPAD)
19 {
21 {
22 switch (System.GetPlatform())
23 {
24 case EPlatform.PS4:
25 case EPlatform.PS5:
26 case EPlatform.PS5_PRO:
27 {
28 tag = "simple_keybind_gamepad_ps";
29 break;
30 }
31
32 case EPlatform.XBOX_ONE:
33 case EPlatform.XBOX_ONE_S:
34 case EPlatform.XBOX_ONE_X:
35 case EPlatform.XBOX_SERIES_S:
36 case EPlatform.XBOX_SERIES_X:
37 {
38 tag = "simple_keybind_gamepad_xbox";
39 break;
40 }
41
42 default:
43 {
44 tag = "simple_keybind_gamepad_generic";
45 }
46 }
47 }
48 else
49 {
50 tag = "simple_keybind_gamepad_xbox";
51 }
52 }
53
54 SCR_SimpleKeybindDialogUI dialog = new SCR_SimpleKeybindDialogUI(entry, displayName, actionName, binding, device, showOverrideWarning);
56
57 return dialog;
58 }
59
60 //------------------------------------------------------------------------------------------------
61 static SCR_AdvancedKeybindDialogUI CreateAdvancedKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, string actionPreset, SCR_EActionPrefixType prefixType)
62 {
63 SCR_AdvancedKeybindDialogUI dialog = new SCR_AdvancedKeybindDialogUI(entry, displayName, actionName, actionPreset, prefixType);
64 SCR_ConfigurableDialogUi.CreateFromPreset(DIALOGS_CONFIG, "advanced_keybind", dialog);
65
66 return dialog;
67 }
68}
69
70//------------------------------------------------------------------------------------------------
71class SCR_KeybindDialogBase : SCR_ConfigurableDialogUi
72{
73 protected SCR_KeyBindingEntry m_Entry;
74 protected string m_sActionName;
75 protected string m_sDisplayName;
76
77 protected EInputDeviceType m_eDevice;
78
80
81 //-----------------------------------------------------------------------------------------------
82 protected void Setup(SCR_KeyBindingEntry entry, string displayName, string actionName, EInputDeviceType device)
83 {
84 m_Entry = entry;
85
86 m_sDisplayName = displayName;
87 m_sActionName = actionName;
88 m_eDevice = device;
89
92 {
93 Print("SCR_KeybindDialogBase::Keybind module for settings manager not found!", LogLevel.WARNING);
94 return;
95 }
96 }
97}
SCR_SettingsManager GetSettingsManager()
Definition game.c:190
bool IsPlatformGameConsole()
Definition game.c:1357
ArmaReforgerScripted GetGame()
Definition game.c:1398
EInputDeviceType m_eDevice
SCR_SettingsManagerKeybindModule m_SettingsKeybindModule
class SCR_KeybindDialogs m_Entry
string m_sActionName
ESettingManagerModuleType
Manages input key bindings, presets, contexts, and device calibration. Provides functions for creatin...
static SCR_ConfigurableDialogUi CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj=null)
Creates a dialog from preset.
static SCR_SimpleKeybindDialogUI CreateSimpleKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, InputBinding binding, EInputDeviceType device, bool showOverrideWarning=true)
static const string DIALOGS_CONFIG
static SCR_ConfigurableDialogUi CreateKeybindsResetDialog()
static SCR_AdvancedKeybindDialogUI CreateAdvancedKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, string actionPreset, SCR_EActionPrefixType prefixType)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
@ Setup
Definition TestStage.c:15
EPlatform
Definition EPlatform.c:13