Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SuperMenuBase.c
Go to the documentation of this file.
1 /*
2 Class for tab menus, relies on a SCR_SuperMenuComponent placed on menu root widget
3 Do your tab related stuff in a child of SCR_SuperMenuComponent! Leave this for calling necessary events on it, and for global menu necessities
4 */
5 
7 {
8  protected SCR_SuperMenuComponent m_SuperMenuComponent;
9 
10  //------------------------------------------------------------------------------------------------
11  override void OnMenuOpen()
12  {
13  super.OnMenuOpen();
14 
15  m_SuperMenuComponent = SCR_SuperMenuComponent.FindComponent(GetRootWidget());
16  if (!m_SuperMenuComponent)
17  {
18  Print("SCR_SuperMenuBase | OnMenuOpen() | No SCR_SuperMenuComponent in layout root", LogLevel.ERROR);
19  return;
20  }
21 
22  m_SuperMenuComponent.Init(GetRootWidget());
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override void OnMenuShow()
27  {
28  super.OnMenuShow();
29 
30  if (m_SuperMenuComponent)
31  m_SuperMenuComponent.OnMenuShow();
32  }
33 
34  //------------------------------------------------------------------------------------------------
35  override void OnMenuHide()
36  {
37  super.OnMenuHide();
38 
39  if (m_SuperMenuComponent)
40  m_SuperMenuComponent.OnMenuHide();
41  }
42 
43  //------------------------------------------------------------------------------------------------
44  override void OnMenuUpdate(float tDelta)
45  {
46  super.OnMenuUpdate(tDelta);
47 
48  if (m_SuperMenuComponent)
49  m_SuperMenuComponent.OnMenuUpdate(tDelta);
50  }
51 
52  //------------------------------------------------------------------------------------------------
53  override void OnMenuClose()
54  {
55  super.OnMenuClose();
56 
57  if (m_SuperMenuComponent)
58  m_SuperMenuComponent.OnMenuClose();
59  }
60 
61  //----------------------------------------------------------------------------------------
62  override void OnMenuFocusGained()
63  {
64  super.OnMenuFocusGained();
65 
66  if (m_SuperMenuComponent)
67  m_SuperMenuComponent.OnMenuFocusGained();
68  }
69 
70  //----------------------------------------------------------------------------------------
71  override void OnMenuFocusLost()
72  {
73  super.OnMenuFocusLost();
74 
75  if (m_SuperMenuComponent)
76  m_SuperMenuComponent.OnMenuFocusLost();
77  }
78 }
SCR_SuperMenuComponent
Definition: SCR_SuperMenuComponent.c:10
GetRootWidget
Widget GetRootWidget()
Definition: SCR_UITaskManagerComponent.c:160
MenuRootBase
Definition: MenuRootBase.c:6
SCR_SuperMenuBase
Definition: SCR_SuperMenuBase.c:6