Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SettingsManager.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
enum
ESettingManagerModuleType
3
{
4
SETTINGS_MANAGER_INVALID
,
5
SETTINGS_MANAGER_KEYBINDING
,
6
SETTINGS_MANAGER_VIDEO
7
};
8
9
//------------------------------------------------------------------------------------------------
10
class
SCR_SettingsManager
11
{
12
protected
ref array<ref SCR_SettingsManagerModuleBase> m_aModules = {};
13
14
//------------------------------------------------------------------------------------------------
15
void
SCR_SettingsManager
()
16
{
17
//todo: rework this to load out of config so we can just have config with all the modules
18
SCR_SettingsManagerVideoModule
videoModule =
new
SCR_SettingsManagerVideoModule
();
19
if
(videoModule)
20
AddModule(videoModule);
21
22
SCR_SettingsManagerKeybindModule
keybindModule =
new
SCR_SettingsManagerKeybindModule
();
23
if
(keybindModule)
24
AddModule(keybindModule);
25
}
26
27
//------------------------------------------------------------------------------------------------
28
SCR_SettingsManagerModuleBase
GetModule(
ESettingManagerModuleType
moduleType)
29
{
30
foreach
(
SCR_SettingsManagerModuleBase
module : m_aModules)
31
{
32
if
(module.GetModuleType() == moduleType)
33
return
module;
34
}
35
return
null
;
36
}
37
38
//------------------------------------------------------------------------------------------------
40
void
AddModule(notnull
SCR_SettingsManagerModuleBase
module)
41
{
42
if
(!GetModule(module.GetModuleType()))
43
m_aModules.Insert(module);
44
}
45
}
46
47
//------------------------------------------------------------------------------------------------
48
class
SCR_SettingsManagerModuleBase
49
{
50
protected
ESettingManagerModuleType
m_eModuleType
;
51
52
//------------------------------------------------------------------------------------------------
53
ESettingManagerModuleType
GetModuleType
()
54
{
55
return
m_eModuleType
;
56
}
57
58
//------------------------------------------------------------------------------------------------
59
void
SetModuleType
(
ESettingManagerModuleType
managerType)
60
{
61
m_eModuleType
= managerType;
62
}
63
64
//------------------------------------------------------------------------------------------------
65
void
SCR_SettingsManagerModuleBase
()
66
{
67
68
}
69
}
SETTINGS_MANAGER_VIDEO
@ SETTINGS_MANAGER_VIDEO
Definition:
SCR_SettingsManager.c:6
GetModuleType
ESettingManagerModuleType GetModuleType()
Definition:
SCR_SettingsManager.c:53
SETTINGS_MANAGER_INVALID
@ SETTINGS_MANAGER_INVALID
Definition:
SCR_SettingsManager.c:4
m_eModuleType
class SCR_SettingsManager m_eModuleType
SCR_SettingsManagerKeybindModule
Definition:
SCR_SettingsManagerKeybindModule.c:2
SCR_SettingsManagerModuleBase
void SCR_SettingsManagerModuleBase()
Definition:
SCR_SettingsManager.c:65
SetModuleType
void SetModuleType(ESettingManagerModuleType managerType)
Definition:
SCR_SettingsManager.c:59
SETTINGS_MANAGER_KEYBINDING
@ SETTINGS_MANAGER_KEYBINDING
Definition:
SCR_SettingsManager.c:5
SCR_SettingsManagerVideoModule
Definition:
SCR_SettingsManagerVideoModule.c:2
SCR_SettingsManager
Definition:
SCR_SettingsManager.c:10
ESettingManagerModuleType
ESettingManagerModuleType
Definition:
SCR_SettingsManager.c:2
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
UI
Menu
SettingsMenu
SCR_SettingsManager.c
Generated by
1.8.17