Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignMapInfoDisplay.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  protected bool m_bMapOpen;
5 
6  //------------------------------------------------------------------------------------------------
7  override void DisplayStartDraw(IEntity owner)
8  {
9  super.DisplayStartDraw(owner);
10 
11  SCR_MapEntity.GetOnMapOpen().Insert(OnMapOpen);
12  SCR_MapEntity.GetOnMapClose().Insert(OnMapClose);
13  }
14 
15  //------------------------------------------------------------------------------------------------
16  override void DisplayStopDraw(IEntity owner)
17  {
18  super.DisplayStartDraw(owner);
19 
20  SCR_MapEntity.GetOnMapOpen().Remove(OnMapOpen);
21  SCR_MapEntity.GetOnMapClose().Remove(OnMapClose);
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  override void UpdateHUD()
26  {
27  m_bPeriodicRefresh = false;
28 
29  if (!m_wRoot || !m_bInitDone)
30  return;
31 
32  if (m_Campaign.IsTutorial() || m_Campaign.GetIsMatchOver())
33  {
34  Show(false);
35  return;
36  }
37 
38  if (m_bMapOpen)
39  Show(true);
40 
41  UpdateHUDValues();
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  void OnMapOpen(MapConfiguration config)
46  {
47  if (m_Campaign.IsTutorial())
48  return;
49 
50  m_bMapOpen = true;
51 
52  if (SCR_DeployMenuMain.GetDeployMenu() == null)
53  {
54  Show(true);
55  UpdateHUD();
56  }
57  else
58  {
59  Show(false);
60  }
61  }
62 
63  //------------------------------------------------------------------------------------------------
64  void OnMapClose(MapConfiguration config)
65  {
66  if (m_Campaign.IsTutorial())
67  return;
68 
69  m_bMapOpen = false;
70  Show(false);
71  }
72 };
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
Show
override void Show(WorkspaceWidget pWorkspace, Widget pToolTipWidget, float desiredPosX, float desiredPosY)
Definition: SCR_ScriptedWidgetTooltip.c:55
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
SCR_CampaignInfoDisplay
Definition: SCR_CampaignInfoDisplay.c:2
SCR_CampaignMapInfoDisplay
Definition: SCR_CampaignMapInfoDisplay.c:2