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_MapUIBaseComponent.c
Go to the documentation of this file.
1
// Base for 2D map UI components
2
[
BaseContainerProps
()]
3
class
SCR_MapUIBaseComponent
:
ScriptedWidgetComponent
4
{
5
[
Attribute
(
"0"
,
UIWidgets
.Auto,
"Disable this component, useful for example when we want to inherit config without a specific component"
)]
6
protected
bool
m_bDisableComponent
;
7
8
[
Attribute
(
"0"
,
desc
:
"All other exclusive Map UI Components are disabled when this component is enabled"
)]
9
protected
bool
m_bIsExclusive
;
10
11
protected
bool
m_bHookToRoot
=
false
;
// determine whether this component is hooked to the root widget for use of ScriptedWidgetEventHandler events
12
protected
Widget
m_RootWidget
;
// map layout root widget
13
protected
SCR_MapEntity
m_MapEntity
;
14
15
//------------------------------------------------------------------------------------------------
16
// BASE METHODS
17
//------------------------------------------------------------------------------------------------
18
19
//------------------------------------------------------------------------------------------------
22
protected
void
OnMapOpen
(
MapConfiguration
config)
23
{
24
if
(
m_bHookToRoot
)
25
m_RootWidget
.AddHandler(
this
);
26
}
27
28
//------------------------------------------------------------------------------------------------
31
protected
void
OnMapClose
(
MapConfiguration
config)
32
{
33
if
(
m_bHookToRoot
)
34
m_RootWidget
.RemoveHandler(
this
);
35
}
36
37
//------------------------------------------------------------------------------------------------
39
bool
IsConfigDisabled
()
40
{
41
return
m_bDisableComponent
;
42
}
43
44
//------------------------------------------------------------------------------------------------
46
bool
IsExclusive
()
47
{
48
return
m_bIsExclusive
;
49
}
50
51
//------------------------------------------------------------------------------------------------
55
void
SetActive
(
bool
active,
bool
isCleanup =
false
)
56
{
57
if
(active)
58
{
59
m_RootWidget
=
m_MapEntity
.GetMapConfig().RootWidgetRef;
// Needs to be refreshed here
60
61
m_MapEntity
.GetOnMapOpen().Insert(
OnMapOpen
);
62
m_MapEntity
.GetOnMapClose().Insert(
OnMapClose
);
63
}
64
else
65
{
66
m_MapEntity
.GetOnMapOpen().Remove(
OnMapOpen
);
67
m_MapEntity
.GetOnMapClose().Remove(
OnMapClose
);
68
69
if
(!isCleanup)
70
m_MapEntity
.DeactivateComponent(
this
);
71
}
72
}
73
74
//------------------------------------------------------------------------------------------------
76
void
Init
();
77
78
//------------------------------------------------------------------------------------------------
80
void
Update
(
float
timeSlice);
81
82
//------------------------------------------------------------------------------------------------
83
bool
IsToolMenuFocused
()
84
{
85
SCR_MapToolMenuUI
toolMenu =
SCR_MapToolMenuUI
.Cast(
m_MapEntity
.GetMapUIComponent(
SCR_MapToolMenuUI
));
86
if
(toolMenu)
87
return
toolMenu.IsFocused();
88
89
return
false
;
90
}
91
92
//------------------------------------------------------------------------------------------------
93
// constructor
94
void
SCR_MapUIBaseComponent
()
95
{
96
m_MapEntity
=
SCR_MapEntity
.
GetMapInstance
();
97
}
98
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_MapToolMenuUI
void SCR_MapToolMenuUI()
Definition
SCR_MapToolMenuUI.c:484
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
MapConfiguration
Definition
MapConfiguration.c:3
SCR_MapEntity
Definition
SCR_MapEntity.c:18
SCR_MapEntity::GetMapInstance
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition
SCR_MapEntity.c:112
SCR_MapUIBaseComponent::m_bHookToRoot
bool m_bHookToRoot
Definition
SCR_MapUIBaseComponent.c:11
SCR_MapUIBaseComponent::m_bIsExclusive
bool m_bIsExclusive
Definition
SCR_MapUIBaseComponent.c:9
SCR_MapUIBaseComponent::OnMapOpen
void OnMapOpen(MapConfiguration config)
Definition
SCR_MapUIBaseComponent.c:22
SCR_MapUIBaseComponent::SCR_MapUIBaseComponent
void SCR_MapUIBaseComponent()
Definition
SCR_MapUIBaseComponent.c:94
SCR_MapUIBaseComponent::m_MapEntity
SCR_MapEntity m_MapEntity
Definition
SCR_MapUIBaseComponent.c:13
SCR_MapUIBaseComponent::OnMapClose
void OnMapClose(MapConfiguration config)
Definition
SCR_MapUIBaseComponent.c:31
SCR_MapUIBaseComponent::Init
void Init()
Init method for cases where all modules and components should be loaded already so constructor cannot...
SCR_MapUIBaseComponent::m_bDisableComponent
bool m_bDisableComponent
Definition
SCR_MapUIBaseComponent.c:6
SCR_MapUIBaseComponent::IsExclusive
bool IsExclusive()
Definition
SCR_MapUIBaseComponent.c:46
SCR_MapUIBaseComponent::m_RootWidget
Widget m_RootWidget
Definition
SCR_MapUIBaseComponent.c:12
SCR_MapUIBaseComponent::IsToolMenuFocused
bool IsToolMenuFocused()
Definition
SCR_MapUIBaseComponent.c:83
SCR_MapUIBaseComponent::Update
void Update(float timeSlice)
Update method for frame operations.
SCR_MapUIBaseComponent::SetActive
void SetActive(bool active, bool isCleanup=false)
Definition
SCR_MapUIBaseComponent.c:55
SCR_MapUIBaseComponent::IsConfigDisabled
bool IsConfigDisabled()
Definition
SCR_MapUIBaseComponent.c:39
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Map
ComponentsUI
SCR_MapUIBaseComponent.c
Generated by
1.17.0