Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseSelectionMenu.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3[BaseContainerProps(configRoot: true)]
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)]
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
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
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
This enum contains all IDs for DiagMenu entries added in script.
Definition DebugMenuID.c:4
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Diagnostic and developer menu system.
Definition DiagMenu.c:18
ref SCR_BaseSelectionMenuDisplay m_pDisplay
The display responsible for displaying the UI of this radial menu.
override event void OnUpdate(IEntity owner, float timeSlice)
Callback when menu update is requested.
override event void OnClose(IEntity owner)
Callback when close is requested.
override event void OnOpen(IEntity owner)
Callback when open is requested.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
SCR_FieldOfViewSettings Attribute