Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
ChimeraMenuBase.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 enum ChimeraMenuPreset : ScriptMenuPresetEnum
4 {
63 };
64 
65 //------------------------------------------------------------------------------------------------
67 // #define MPTEST // TODO: remove
68 
69 //------------------------------------------------------------------------------------------------
70 class ChimeraMenuBase : MenuBase
71 {
72  // Editbox type check
73  protected const string INPUT_CONTEXT_EDIT = "MenuTextEditContext";
74  protected bool m_bTextEditActive = false;
75  ref ScriptInvoker m_OnTextEditContextChange = new ScriptInvoker;
76  ref ScriptInvoker m_OnUpdate = new ScriptInvoker; // (float tDelta)
77 
78  protected static ChimeraMenuBase m_ThisMenu;
79 
80  //------------------------------------------------------------------------------------------------
81  static ChimeraMenuBase CurrentChimeraMenu()
82  {
83  return m_ThisMenu;
84  }
85 
86  //------------------------------------------------------------------------------------------------
87  override void OnMenuInit()
88  {
89  m_ThisMenu = this;
90  }
91 
92  //------------------------------------------------------------------------------------------------
93  override void OnMenuUpdate(float tDelta)
94  {
95  super.OnMenuUpdate(tDelta);
96 
97  // Check edit box context active
98  bool ctxActive = GetGame().GetInputManager().IsContextActive(INPUT_CONTEXT_EDIT);
99  m_OnTextEditContextChange.Invoke(ctxActive);
100 
101  // Invoke OnUpdate
102  m_OnUpdate.Invoke(tDelta);
103  }
104 
105  //------------------------------------------------------------------------------------------------
106  override void OnMenuOpen()
107  {
108  super.OnMenuOpened();
109  SCR_MenuHelper.OnMenuOpen(this);
110  }
111 
112  //------------------------------------------------------------------------------------------------
113  override void OnMenuOpened()
114  {
115  super.OnMenuOpened();
116  SCR_MenuHelper.OnMenuOpened(this);
117  }
118 
119  //------------------------------------------------------------------------------------------------
120  override void OnMenuClose()
121  {
122  super.OnMenuClose();
123  SCR_MenuHelper.OnMenuClose(this);
124  }
125 
126  //------------------------------------------------------------------------------------------------
127  override void OnMenuFocusGained()
128  {
129  super.OnMenuFocusGained();
130  SCR_MenuHelper.OnMenuFocusGained(this);
131  }
132 
133  //------------------------------------------------------------------------------------------------
134  override void OnMenuFocusLost()
135  {
136  super.OnMenuFocusLost();
137  SCR_MenuHelper.OnMenuFocusLost(this);
138  }
139 
140  //------------------------------------------------------------------------------------------------
141  override void OnMenuShow()
142  {
143  super.OnMenuShow();
144  SCR_MenuHelper.OnMenuShow(this);
145  }
146 
147  //------------------------------------------------------------------------------------------------
148  override void OnMenuHide()
149  {
150  super.OnMenuHide();
151  SCR_MenuHelper.OnMenuHide(this);
152  }
153 
154  //------------------------------------------------------------------------------------------------
156  static ChimeraMenuBase GetOwnerMenu(Widget w)
157  {
158  auto game = GetGame();
159 
160  if (!game)
161  return null;
162 
163  auto menuManager = game.GetMenuManager();
164 
165  if (!menuManager)
166  return null;
167 
168  MenuBase menuBase = menuManager.GetOwnerMenu(w);
169 
170  if (!menuBase)
171  return null;
172 
173  ChimeraMenuBase m = ChimeraMenuBase.Cast(menuBase);
174 
175  if (!m)
176  return null;
177 
178  return m;
179  }
180 };
ChimeraMenuBase
Constant variables used in various menus.
Definition: ChimeraMenuBase.c:70
GroupFlagDialog
@ GroupFlagDialog
Definition: ChimeraMenuBase.c:60
ConfigurableDialog
@ ConfigurableDialog
Definition: ChimeraMenuBase.c:49
LoginDialog
@ LoginDialog
Definition: ChimeraMenuBase.c:11
ServerBrowserMenu
@ ServerBrowserMenu
Definition: ChimeraMenuBase.c:13
EditorAttributesDialog
@ EditorAttributesDialog
Definition: ChimeraMenuBase.c:25
RespawnSuperMenu
@ RespawnSuperMenu
Definition: ChimeraMenuBase.c:34
FeedbackDialog
@ FeedbackDialog
Definition: ChimeraMenuBase.c:29
EditorPlayerListDialog
@ EditorPlayerListDialog
Definition: ChimeraMenuBase.c:22
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
MainMenu
@ MainMenu
Definition: ChimeraMenuBase.c:5
WelcomeScreenMenu
@ WelcomeScreenMenu
Definition: ChimeraMenuBase.c:35
Inventory20Menu
@ Inventory20Menu
Definition: ChimeraMenuBase.c:30
EditorSelectionMenu
@ EditorSelectionMenu
Definition: ChimeraMenuBase.c:7
EditorBrowserDialog
@ EditorBrowserDialog
Definition: ChimeraMenuBase.c:26
EditorMenu
@ EditorMenu
Definition: ChimeraMenuBase.c:18
CareerProfileMenu
@ CareerProfileMenu
Definition: ChimeraMenuBase.c:57
EditorActionListDialog
@ EditorActionListDialog
Definition: ChimeraMenuBase.c:20
ContentBrowser
@ ContentBrowser
Definition: ChimeraMenuBase.c:32
CreditsLicensesMenu
@ CreditsLicensesMenu
Definition: ChimeraMenuBase.c:54
WidgetLibraryMenu
@ WidgetLibraryMenu
Definition: ChimeraMenuBase.c:40
DebriefingScreenMenu
@ DebriefingScreenMenu
Definition: ChimeraMenuBase.c:36
EditorLoadDialog
@ EditorLoadDialog
Definition: ChimeraMenuBase.c:28
LoginDialogConsole
@ LoginDialogConsole
Definition: ChimeraMenuBase.c:12
LoadingOverlay
@ LoadingOverlay
Definition: ChimeraMenuBase.c:51
CreditsMenu
@ CreditsMenu
Definition: ChimeraMenuBase.c:53
EditorEntityListDialog
@ EditorEntityListDialog
Definition: ChimeraMenuBase.c:21
EditorPlacingMenuDialog
@ EditorPlacingMenuDialog
Definition: ChimeraMenuBase.c:24
EditorSaveDialog
@ EditorSaveDialog
Definition: ChimeraMenuBase.c:27
ErrorDialog
@ ErrorDialog
Definition: ChimeraMenuBase.c:15
TaskDetail
@ TaskDetail
Definition: ChimeraMenuBase.c:42
ScrollTest
@ ScrollTest
Definition: ChimeraMenuBase.c:50
ReportItemDialog
@ ReportItemDialog
Definition: ChimeraMenuBase.c:31
GroupMenu
@ GroupMenu
Definition: ChimeraMenuBase.c:59
EndgameScreen
@ EndgameScreen
Definition: ChimeraMenuBase.c:43
EditorFactionListDialog
@ EditorFactionListDialog
Definition: ChimeraMenuBase.c:23
ProfileDialog
@ ProfileDialog
Definition: ChimeraMenuBase.c:14
MapMenu
@ MapMenu
Definition: ChimeraMenuBase.c:16
MultiplayerDialog
@ MultiplayerDialog
Definition: ChimeraMenuBase.c:10
StartScenarioDialog
@ StartScenarioDialog
Definition: ChimeraMenuBase.c:44
RoleSelectionDialog
@ RoleSelectionDialog
Definition: ChimeraMenuBase.c:61
GroupSettingsDialog
@ GroupSettingsDialog
Definition: ChimeraMenuBase.c:56
SCR_MenuHelper
Definition: SCR_MenuHelper.c:15
PauseMenu
@ PauseMenu
Definition: ChimeraMenuBase.c:9
PlayerListMenu
@ PlayerListMenu
Definition: ChimeraMenuBase.c:38
WelcomeDialog
@ WelcomeDialog
Definition: ChimeraMenuBase.c:55
PlayMenu
@ PlayMenu
Definition: ChimeraMenuBase.c:6
PickAssignee
@ PickAssignee
Definition: ChimeraMenuBase.c:41
GalleryDialog
@ GalleryDialog
Definition: ChimeraMenuBase.c:48
SettingsSuperMenu
@ SettingsSuperMenu
Definition: ChimeraMenuBase.c:37
FieldManualDialog
@ FieldManualDialog
Definition: ChimeraMenuBase.c:39
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition: ChimeraMenuBase.c:3
NewsDialog
@ NewsDialog
Definition: ChimeraMenuBase.c:47
EditorModesDialog
@ EditorModesDialog
Definition: ChimeraMenuBase.c:19
CreateAccountDialog
@ CreateAccountDialog
Definition: ChimeraMenuBase.c:52
CampaignBuildingPlacingMenuDialog
@ CampaignBuildingPlacingMenuDialog
Definition: ChimeraMenuBase.c:58
ContentBrowserDetailsMenu
@ ContentBrowserDetailsMenu
Definition: ChimeraMenuBase.c:33
ProfileSuperMenu
@ ProfileSuperMenu
Definition: ChimeraMenuBase.c:46
GamepadRemovalDialog
@ GamepadRemovalDialog
Definition: ChimeraMenuBase.c:62
CareerMenu
@ CareerMenu
Definition: ChimeraMenuBase.c:8
WorldEditorIngameMenu
@ WorldEditorIngameMenu
Definition: ChimeraMenuBase.c:17
ScenarioMenu
@ ScenarioMenu
Definition: ChimeraMenuBase.c:45