Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapModuleBase.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4class SCR_MapModuleBase : Managed
5{
6 [Attribute("0", UIWidgets.Auto, "Disable this module, useful for example when we want to inherit config without a specific module" )]
7 protected bool m_bDisableModule;
8
9 protected Widget m_wRootWidget;
11
12 //------------------------------------------------------------------------------------------------
14 protected void OnMapOpen(MapConfiguration config)
15 {}
16
17 //------------------------------------------------------------------------------------------------
19 protected void OnMapClose(MapConfiguration config)
20 {}
21
22 //------------------------------------------------------------------------------------------------
25 {
26 return m_bDisableModule;
27 }
28
29 //------------------------------------------------------------------------------------------------
33 void SetActive(bool active, bool isCleanup = false)
34 {
35 if (active)
36 {
37 m_wRootWidget = m_MapEntity.GetMapConfig().RootWidgetRef; // Needs to be refreshed here
38
39 m_MapEntity.GetOnMapOpen().Insert(OnMapOpen);
40 m_MapEntity.GetOnMapClose().Insert(OnMapClose);
41 }
42 else
43 {
44 m_MapEntity.GetOnMapOpen().Remove(OnMapOpen);
45 m_MapEntity.GetOnMapClose().Remove(OnMapClose);
46
47 if (!isCleanup)
48 m_MapEntity.DeactivateModule(this);
49 }
50 }
51
52 //------------------------------------------------------------------------------------------------
54 void Init()
55 {}
56
57 //------------------------------------------------------------------------------------------------
59 void Update(float timeSlice)
60 {}
61
62 //------------------------------------------------------------------------------------------------
68};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
void Update(float timeSlice)
Update method for frame operations.
void OnMapClose(MapConfiguration config)
SCR_MapEntity event.
bool IsConfigDisabled()
Whether this module is disabled in config.
void SetActive(bool active, bool isCleanup=false)
void OnMapOpen(MapConfiguration config)
SCR_MapEntity event.
void SCR_MapModuleBase()
Dont use arguments in the contructor for this class or its children.
SCR_MapEntity m_MapEntity
void Init()
Init method for cases where all modules and components should be loaded already so constructor cannot...
SCR_FieldOfViewSettings Attribute