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_BaseSelectionMenu.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
3
[
BaseContainerProps
(configRoot:
true
)]
4
class
SCR_BaseSelectionMenu
:
ScriptedSelectionMenu
5
{
6
#ifdef ENABLE_DIAG
8
protected
static
bool
s_bEnableRadialMenuLog =
false
;
10
protected
static
bool
s_bEnableRadialMenuDiag =
false
;
12
protected
static
bool
s_bDiagnosticsMenuRegistered =
false
;
13
#endif
14
16
[
Attribute
(
""
,
UIWidgets
.Object)]
17
protected
ref
SCR_BaseSelectionMenuDisplay
m_pDisplay
;
18
19
//------------------------------------------------------------------------------------------------
21
protected
override
event
void
OnOpen
(
IEntity
owner)
22
{
23
// TODO: Handle creation of widgets
24
#ifdef ENABLE_DIAG
25
if
(
SCR_BaseSelectionMenu
.IsRadialMenuLoggingEnabled())
26
{
27
Print
(
"Radial menu "
+
this
+
" opened! Owner: "
+ owner);
28
}
29
#endif
30
}
31
32
//------------------------------------------------------------------------------------------------
34
protected
override
event
void
OnClose
(
IEntity
owner)
35
{
36
// TODO: Handle destruction of widgets
37
#ifdef ENABLE_DIAG
38
if
(
SCR_BaseSelectionMenu
.IsRadialMenuLoggingEnabled())
39
{
40
Print
(
"Radial menu "
+
this
+
" closed! Owner: "
+ owner);
41
}
42
#endif
43
}
44
45
//------------------------------------------------------------------------------------------------
47
protected
override
event
void
OnUpdate
(
IEntity
owner,
float
timeSlice)
48
{
49
// TODO: Handle update of widgets
50
// TODO: Handle input, selection and performing of the action
51
}
52
53
//------------------------------------------------------------------------------------------------
54
// Initialize the radial menu
55
void
SCR_BaseSelectionMenu
()
56
{
57
#ifdef ENABLE_DIAG
59
if
(!s_bDiagnosticsMenuRegistered)
60
{
61
const
string
radialMenuGroup =
"Radial Menu"
;
62
DiagMenu
.RegisterMenu(
SCR_DebugMenuID
.DEBUGUI_RADIALMENU_MENU, radialMenuGroup,
""
);
63
DiagMenu
.RegisterBool(
SCR_DebugMenuID
.DEBUGUI_RADIALMENU_DIAGNOSTICS,
""
,
"Enable diagnostics"
, radialMenuGroup);
64
DiagMenu
.RegisterBool(
SCR_DebugMenuID
.DEBUGUI_RADIALMENU_LOGGING,
""
,
"Enable logging"
, radialMenuGroup);
65
s_bDiagnosticsMenuRegistered =
true
;
66
}
67
#endif
68
69
}
70
71
//------------------------------------------------------------------------------------------------
72
// Cleanup
73
void
~SCR_BaseSelectionMenu
()
74
{
75
m_pDisplay
= null;
76
}
77
78
79
#ifdef ENABLE_DIAG
80
//------------------------------------------------------------------------------------------------
82
static
bool
IsRadialMenuDiagEnabled()
83
{
84
s_bEnableRadialMenuDiag =
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_RADIALMENU_DIAGNOSTICS);
85
return
s_bEnableRadialMenuDiag;
86
}
87
88
//------------------------------------------------------------------------------------------------
90
static
bool
IsRadialMenuLoggingEnabled()
91
{
92
s_bEnableRadialMenuLog = DiagMenu.GetBool(
SCR_DebugMenuID
.DEBUGUI_RADIALMENU_LOGGING);
93
return
s_bEnableRadialMenuLog;
94
}
95
#endif
96
};
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
DiagMenu
Diagnostic and developer menu system.
Definition
DiagMenu.c:18
IEntity
Definition
IEntity.c:13
SCR_BaseSelectionMenuDisplay
Definition
SCR_BaseSelectionMenuDisplay.c:4
SCR_BaseSelectionMenu::m_pDisplay
ref SCR_BaseSelectionMenuDisplay m_pDisplay
The display responsible for displaying the UI of this radial menu.
Definition
SCR_BaseSelectionMenu.c:17
SCR_BaseSelectionMenu::OnUpdate
override event void OnUpdate(IEntity owner, float timeSlice)
Callback when menu update is requested.
Definition
SCR_BaseSelectionMenu.c:47
SCR_BaseSelectionMenu::SCR_BaseSelectionMenu
void SCR_BaseSelectionMenu()
Definition
SCR_BaseSelectionMenu.c:55
SCR_BaseSelectionMenu::OnClose
override event void OnClose(IEntity owner)
Callback when close is requested.
Definition
SCR_BaseSelectionMenu.c:34
SCR_BaseSelectionMenu::OnOpen
override event void OnOpen(IEntity owner)
Callback when open is requested.
Definition
SCR_BaseSelectionMenu.c:21
SCR_BaseSelectionMenu::~SCR_BaseSelectionMenu
void ~SCR_BaseSelectionMenu()
Definition
SCR_BaseSelectionMenu.c:73
ScriptedSelectionMenu
Definition
ScriptedSelectionMenu.c:13
UIWidgets
Definition
attributes.c:40
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
HUD
SelectionMenu
SCR_BaseSelectionMenu.c
Generated by
1.17.0