Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BaseSelectionMenu.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 [BaseContainerProps(configRoot: true)]
5 {
6  #ifdef ENABLE_DIAG
7  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
56  {
57  #ifdef ENABLE_DIAG
58  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_BaseSelectionMenu
Scripted base radial menu implementation.
Definition: SCR_BaseSelectionMenu.c:4
ScriptedSelectionMenu
Definition: ScriptedSelectionMenu.c:12
Attribute
SCR_BaseSelectionMenu Attribute
Post-process effect of scripted camera.
SCR_BaseSelectionMenuDisplay
Definition: SCR_BaseSelectionMenuDisplay.c:3
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition: DebugMenuID.c:3
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468