Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_KeybindDialogs.c
Go to the documentation of this file.
1
class
SCR_KeybindDialogs
2
{
3
protected
static
const
string
DIALOGS_CONFIG
=
"{A24DA5B329261CB7}Configs/Dialogs/KeybindDialogs.conf"
;
4
5
//---------------------------------------------------------------------------------------------
6
static
SCR_ConfigurableDialogUi
CreateKeybindsResetDialog
()
7
{
8
if
(
System
.GetPlatform() ==
EPlatform
.PS4 ||
System
.GetPlatform() ==
EPlatform
.PS5 ||
System
.GetPlatform() ==
EPlatform
.PS5_PRO)
9
return
SCR_ConfigurableDialogUi
.
CreateFromPreset
(
DIALOGS_CONFIG
,
"reset_keybinds_ps"
);
10
11
return
SCR_ConfigurableDialogUi
.
CreateFromPreset
(
DIALOGS_CONFIG
,
"reset_keybinds"
);
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
{
20
if
(
GetGame
().
IsPlatformGameConsole
())
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);
55
SCR_ConfigurableDialogUi
.
CreateFromPreset
(
DIALOGS_CONFIG
, tag, dialog);
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
//------------------------------------------------------------------------------------------------
71
class
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
79
protected
SCR_SettingsManagerKeybindModule
m_SettingsKeybindModule
;
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
90
m_SettingsKeybindModule
=
SCR_SettingsManagerKeybindModule
.Cast(
GetGame
().
GetSettingsManager
().GetModule(
ESettingManagerModuleType
.SETTINGS_MANAGER_KEYBINDING));
91
if
(!
m_SettingsKeybindModule
)
92
{
93
Print
(
"SCR_KeybindDialogBase::Keybind module for settings manager not found!"
,
LogLevel
.WARNING);
94
return
;
95
}
96
}
97
}
GetSettingsManager
SCR_SettingsManager GetSettingsManager()
Definition
game.c:190
IsPlatformGameConsole
bool IsPlatformGameConsole()
Definition
game.c:1357
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
m_eDevice
EInputDeviceType m_eDevice
Definition
SCR_KeybindDialogs.c:77
m_SettingsKeybindModule
SCR_SettingsManagerKeybindModule m_SettingsKeybindModule
Definition
SCR_KeybindDialogs.c:79
m_Entry
class SCR_KeybindDialogs m_Entry
m_sActionName
string m_sActionName
Definition
SCR_PlayerCommandsConfig.c:1
ESettingManagerModuleType
ESettingManagerModuleType
Definition
SCR_SettingsManager.c:3
m_sDisplayName
string m_sDisplayName
Definition
SCR_WeaponInfo_MultiWeaponTurret.c:953
InputBinding
Manages input key bindings, presets, contexts, and device calibration. Provides functions for creatin...
Definition
InputBinding.c:24
SCR_AdvancedKeybindDialogUI
Definition
SCR_AdvancedKeybindDialogUI.c:3
SCR_ConfigurableDialogUi
Definition
SCR_ConfigurableDialogUI.c:17
SCR_ConfigurableDialogUi::CreateFromPreset
static SCR_ConfigurableDialogUi CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj=null)
Creates a dialog from preset.
Definition
SCR_ConfigurableDialogUI.c:94
SCR_KeybindDialogs
Definition
SCR_KeybindDialogs.c:2
SCR_KeybindDialogs::CreateSimpleKeybindDialog
static SCR_SimpleKeybindDialogUI CreateSimpleKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, InputBinding binding, EInputDeviceType device, bool showOverrideWarning=true)
Definition
SCR_KeybindDialogs.c:15
SCR_KeybindDialogs::DIALOGS_CONFIG
static const string DIALOGS_CONFIG
Definition
SCR_KeybindDialogs.c:3
SCR_KeybindDialogs::CreateKeybindsResetDialog
static SCR_ConfigurableDialogUi CreateKeybindsResetDialog()
Definition
SCR_KeybindDialogs.c:6
SCR_KeybindDialogs::CreateAdvancedKeybindDialog
static SCR_AdvancedKeybindDialogUI CreateAdvancedKeybindDialog(SCR_KeyBindingEntry entry, string displayName, string actionName, string actionPreset, SCR_EActionPrefixType prefixType)
Definition
SCR_KeybindDialogs.c:61
SCR_SettingsManagerKeybindModule
Definition
SCR_SettingsManagerKeybindModule.c:3
SCR_SimpleKeybindDialogUI
Definition
SCR_SimpleKeybindDialogUI.c:3
System
Definition
System.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Setup
@ Setup
Definition
TestStage.c:15
EPlatform
EPlatform
Definition
EPlatform.c:13
scripts
Game
UI
Menu
SCR_KeybindDialogs.c
Generated by
1.17.0