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 //------------------------------------------------------------------------------------------------
3 {
7 };
8 
9 //------------------------------------------------------------------------------------------------
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
19  if (videoModule)
20  AddModule(videoModule);
21 
23  if (keybindModule)
24  AddModule(keybindModule);
25  }
26 
27  //------------------------------------------------------------------------------------------------
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 //------------------------------------------------------------------------------------------------
49 {
51 
52  //------------------------------------------------------------------------------------------------
54  {
55  return m_eModuleType;
56  }
57 
58  //------------------------------------------------------------------------------------------------
60  {
61  m_eModuleType = managerType;
62  }
63 
64  //------------------------------------------------------------------------------------------------
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