Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ModeInfoBarEditorUIComponent.c
Go to the documentation of this file.
1 class SCR_ModeInfoBarEditorUIComponent : ScriptedWidgetComponent
2 {
3  [Attribute("OpenPauseMenuButton")]
4  protected string m_sPauseMenuButtonName;
5 
6  [Attribute("CloseEditorButton")]
7  protected string m_sCloseEditorButtonName;
8 
9  //------------------------------------------------------------------------------------------------
10  protected void OpenPauseMenuButton(Widget widget, float value, EActionTrigger actionTrigger)
11  {
12  if (!GetGame().GetMenuManager().IsAnyDialogOpen())
13  ArmaReforgerScripted.OpenPauseMenu();
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  protected void CloseEditorButton(Widget widget, float value, EActionTrigger actionTrigger)
18  {
19  SCR_EditorManagerEntity editorManagerEntity = SCR_EditorManagerEntity.GetInstance();
20 
21  if (editorManagerEntity)
22  editorManagerEntity.Close();
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override void HandlerAttached(Widget w)
27  {
28  Widget buttonWidget = w.FindAnyWidget(m_sPauseMenuButtonName);
29  if (buttonWidget)
30  ButtonActionComponent.GetOnAction(buttonWidget).Insert(OpenPauseMenuButton);
31 
32  buttonWidget = w.FindAnyWidget(m_sCloseEditorButtonName);
33  if (buttonWidget)
34  ButtonActionComponent.GetOnAction(buttonWidget).Insert(CloseEditorButton);
35  }
36 }
SCR_ModeInfoBarEditorUIComponent
Definition: SCR_ModeInfoBarEditorUIComponent.c:1
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
Attribute
typedef Attribute
Post-process effect of scripted camera.
ButtonActionComponent
Component to execute action when the button or its shortcut is pressed.
Definition: ButtonActionComponent.c:2
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26