Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SelectionMenuCategory.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
7{
8 [Attribute("-1", desc: "Entry with this index will be used as deafult action")]
9 protected int m_iDefaultEntry;
10
11 [Attribute()]
12 protected ref array<ref SCR_SelectionMenuEntry> m_aEntries;
13
14 //------------------------------------------------------------------------------------------------
15 // Override
16 //------------------------------------------------------------------------------------------------
17
18 //------------------------------------------------------------------------------------------------
19 override protected void OnPerform()
20 {
21
22 }
23
24 //------------------------------------------------------------------------------------------------
25 // Custom
26 //------------------------------------------------------------------------------------------------
27
28 //------------------------------------------------------------------------------------------------
30 {
31 if (m_aEntries.IsIndexValid(m_iDefaultEntry))
32 m_aEntries[m_iDefaultEntry].Perform();
33 }
34
35 //------------------------------------------------------------------------------------------------
37 {
38 if (!m_aEntries)
39 m_aEntries = new array<ref SCR_SelectionMenuEntry>();
40
41 if (!entry)
43
44 m_aEntries.Insert(entry);
45 }
46
47 //------------------------------------------------------------------------------------------------
49 {
50 m_aEntries.RemoveItem(entry);
51 }
52
53 //------------------------------------------------------------------------------------------------
54 // Get set
55 //------------------------------------------------------------------------------------------------
56
57 //------------------------------------------------------------------------------------------------
59 {
60 return m_iDefaultEntry;
61 }
62
63 //------------------------------------------------------------------------------------------------
64 array<ref SCR_SelectionMenuEntry> GetEntries()
65 {
66 if (!m_aEntries)
67 m_aEntries = new array<ref SCR_SelectionMenuEntry>();
68
69 array<ref SCR_SelectionMenuEntry> entries = {};
70
71 for (int i = 0, count = m_aEntries.Count(); i < count; i++)
72 {
73 entries.Insert(m_aEntries[i]);
74 }
75
76 return entries;
77 }
78}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void RemoveEntry(notnull SCR_SelectionMenuEntry entry)
array< ref SCR_SelectionMenuEntry > GetEntries()
ref array< ref SCR_SelectionMenuEntry > m_aEntries
void OnPerform()
void AddEntry(SCR_SelectionMenuEntry entry=null)
int GetDefaultAction()
void PerformDefaultEntry()
int m_iDefaultEntry
void SCR_SelectionMenuEntry()
SCR_FieldOfViewSettings Attribute