Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TutorialMapUI.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3{
4 [Attribute("{3AC52EED5AB6C1E2}UI/layouts/Tutorial/FakeBaseElement.layout", params: "layout")]
6
7 [Attribute("{94F1E2223D7E0588}UI/layouts/Campaign/ServiceHint.layout", params: "layout")]
9
10 protected ref array <SCR_TutorialFakeBaseComponent> m_aFakeBases = {};
11
12 //------------------------------------------------------------------------------------------------
13 void InsertFakeBase(notnull SCR_TutorialFakeBaseComponent fakeBase)
14 {
15 m_aFakeBases.Insert(fakeBase);
16 }
17
18 //------------------------------------------------------------------------------------------------
19 override void OnMapOpen(MapConfiguration config)
20 {
21 super.OnMapOpen(config);
22
23 foreach(SCR_TutorialFakeBaseComponent fakeBase : m_aFakeBases)
24 {
25 if (!fakeBase.m_bVisible)
26 continue;
27
28 CreateFakeBase(fakeBase);
29 }
30 }
31
32 //------------------------------------------------------------------------------------------------
33 void CreateFakeBase(SCR_TutorialFakeBaseComponent fakeBaseComponent)
34 {
35 Widget w = GetGame().GetWorkspace().CreateWidgets(m_sBaseElement, m_wIconsContainer);
36 if (!w)
37 return;
38
40 if (!handler)
41 return;
42
43 handler.SetFakeBase(fakeBaseComponent);
44
45 m_mIcons.Insert(w, handler);
46 FrameSlot.SetSizeToContent(w, true);
47 FrameSlot.SetAlignment(w, 0.5, 0.5);
48
50 handler.UpdateMilitarySymbol();
51 }
52}
ArmaReforgerScripted GetGame()
Definition game.c:1398
ref map< Widget, SCR_MapUIElement > m_mIcons
void SetFakeBase(SCR_TutorialFakeBaseComponent fakeBase)
void CreateFakeBase(SCR_TutorialFakeBaseComponent fakeBaseComponent)
override void OnMapOpen(MapConfiguration config)
ref array< SCR_TutorialFakeBaseComponent > m_aFakeBases
void InsertFakeBase(notnull SCR_TutorialFakeBaseComponent fakeBase)
ResourceName m_sServiceHint
ResourceName m_sBaseElement
SCR_FieldOfViewSettings Attribute