Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
EditorMenuUI.c
Go to the documentation of this file.
1 
4 {
5  protected static void OnShowPlayerList()
6  {
7  ArmaReforgerScripted.OpenPlayerList();
8  }
9  protected void OpenPauseMenu()
10  {
11  if (!GetGame().GetMenuManager().IsAnyDialogOpen() && IsFocused())
12  ArmaReforgerScripted.OpenPauseMenu();
13  }
14 
15  override void OnMenuInit()
16  {
17  super.OnMenuInit();
18 
19  InputManager inputManager = GetGame().GetInputManager();
20  if (inputManager)
21  {
22  inputManager.AddActionListener("ShowScoreboard", EActionTrigger.DOWN, OnShowPlayerList);
23  inputManager.AddActionListener("MenuOpen", EActionTrigger.DOWN, OpenPauseMenu);
24  inputManager.AddActionListener("ChatToggle", EActionTrigger.DOWN, ChatToggle);
25 #ifdef WORKBENCH
26  inputManager.AddActionListener("MenuOpenWB", EActionTrigger.DOWN, OpenPauseMenu);
27 #endif
28  }
29  }
30 
31  override void OnMenuClose()
32  {
33  super.OnMenuClose();
34 
35  InputManager inputManager = GetGame().GetInputManager();
36  if (inputManager)
37  {
38  inputManager.RemoveActionListener("ShowScoreboard", EActionTrigger.DOWN, OnShowPlayerList);
39  inputManager.RemoveActionListener("MenuOpen", EActionTrigger.DOWN, OpenPauseMenu);
40  inputManager.RemoveActionListener("ChatToggle", EActionTrigger.DOWN, ChatToggle);
41 #ifdef WORKBENCH
42  inputManager.RemoveActionListener("MenuOpenWB", EActionTrigger.DOWN, OpenPauseMenu);
43 #endif
44  }
45  }
46 
47  void ChatToggle()
48  {
49  if (!m_ChatPanel)
50  return;
51 
52  if (!m_ChatPanel.IsOpen())
53  SCR_ChatPanelManager.GetInstance().OpenChatPanel(m_ChatPanel);
54  }
55 };
EditorMenuUI
Definition: EditorMenuUI.c:3
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_ChatPanelManager
Definition: SCR_ChatPanelManager.c:12
EditorMenuBase
Definition: EditorMenuBase.c:7