Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DataCollectorUI.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  protected ResourceName m_sBaseLayout = "{76EA77A3A4A16485}UI/layouts/Menus/CareerProfile/DataCollectorUI/StatsEntryBase.layout";
5 
6  protected ResourceName m_sEntryLayout = "{EE1BCC8E5072F4C5}UI/layouts/Menus/CareerProfile/DataCollectorUI/DataStatEntry.layout";
7 
8  protected Widget m_wParentWidget;
9 
10  //------------------------------------------------------------------------------------------------
11  Widget CreateEntry()
12  {
13  if (!GetGame() || !GetGame().GetWorkspace())
14  return null;
15 
16  if (!m_wParentWidget)
17  {
18  m_wParentWidget = GetGame().GetWorkspace().CreateWidgets(m_sBaseLayout);
19  if (!m_wParentWidget)
20  return null;
21  }
22 
23  Widget entriesWidget = m_wParentWidget.FindAnyWidget("Entries");
24  if (!entriesWidget)
25  return null;
26 
27  return GetGame().GetWorkspace().CreateWidgets(m_sEntryLayout, entriesWidget);
28  }
29 
30  //------------------------------------------------------------------------------------------------
31  void SetVisible(bool visible)
32  {
33  m_wParentWidget.SetVisible(visible);
34  }
35 
36  //------------------------------------------------------------------------------------------------
37  Widget GetParentWidget()
38  {
39  return m_wParentWidget;
40  }
41 
42  //------------------------------------------------------------------------------------------------
43  void SCR_DataCollectorUI ()
44  {
45  m_wParentWidget = GetGame().GetWorkspace().CreateWidgets(m_sBaseLayout);
46  }
47 
48  void ~SCR_DataCollectorUI()
49  {
50  m_wParentWidget.RemoveFromHierarchy();
51  }
52 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_DataCollectorUI
Definition: SCR_DataCollectorUI.c:2
m_wParentWidget
protected Widget m_wParentWidget
Definition: SCR_UITaskManagerComponent.c:17