Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FactionCommanderMenuHierarchy.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true)]
3{
5 protected ref array<ref SCR_FactionCommanderMenuEntry> m_aEntriesHierarchy;
6
7 //------------------------------------------------------------------------------------------------
8 void GetEntries(out notnull array<ref SCR_FactionCommanderMenuEntry> entries)
9 {
11 entries = m_aEntriesHierarchy;
12 }
13}
14
16class SCR_FactionCommanderMenuEntry
17{
18 [Attribute("1")]
19 protected bool m_bEnabled;
20
21 [Attribute("", desc: "System Kname to identify this entry by.")]
22 protected string m_sName;
23
24 [Attribute("", desc: "Text used in radial menu UI.")]
25 protected string m_sDisplayName;
26
27 [Attribute("{3262679C50EF4F01}UI/Textures/Icons/icons_wrapperUI.imageset", UIWidgets.ResourceNamePicker, "Imageset with the desired icon.", "imageset")]
28 ResourceName m_sIconImageset;
29
30 [Attribute("", desc: "Imageset quad name.")]
31 protected string m_sIconName;
32
33 [Attribute("0", desc: "When enabled, this entry will open the list of groups Commander can issue the associated order to.")]
34 protected bool m_bGroupOrder;
35
36 [Attribute("0", desc: "Accessible by squad leaders. Group and faction assignment will be available only to the Commander.")]
37 protected bool m_bSupportRequest;
38
39 [Attribute("0", desc: "This entry will be a menu category regardless of it being a group order or having any children (commonly to be expanded later in script).")]
40 protected bool m_bForceCategoryClass;
41
42 [Attribute(desc: "Class for evaluating conditions for visibility and availability of the given entry.")]
44
45 [Attribute()]
46 protected ref array<ref SCR_FactionCommanderMenuEntry> m_aChildEntries;
47
48 [Attribute("0", desc: "Show a hint for this objective when true")]
49 protected bool m_bShowHint;
50
51 [Attribute(uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EHint))]
52 protected EHint m_eHintId;
53
54 //------------------------------------------------------------------------------------------------
55 bool GetShowHint()
56 {
57 return m_bShowHint;
58 }
59
60 //------------------------------------------------------------------------------------------------
61 EHint GetHintId()
62 {
63 return m_eHintId;
64 }
65
66 //------------------------------------------------------------------------------------------------
67 bool IsEnabled()
68 {
69 return m_bEnabled;
70 }
71
72 //------------------------------------------------------------------------------------------------
73 string GetName()
74 {
75 return m_sName;
76 }
77
78 //------------------------------------------------------------------------------------------------
79 string GetDisplayName()
80 {
81 return m_sDisplayName;
82 }
83
84 //------------------------------------------------------------------------------------------------
85 ResourceName GetIconImageset()
86 {
87 return m_sIconImageset;
88 }
89
90 //------------------------------------------------------------------------------------------------
91 string GetIconName()
92 {
93 return m_sIconName;
94 }
95
96 //------------------------------------------------------------------------------------------------
97 bool IsGroupOrder()
98 {
99 return m_bGroupOrder;
100 }
101
102 //------------------------------------------------------------------------------------------------
103 bool IsSupportRequest()
104 {
105 return m_bSupportRequest;
106 }
107
108 //------------------------------------------------------------------------------------------------
109 bool IsCategory()
110 {
111 return m_bForceCategoryClass;
112 }
113
114 //------------------------------------------------------------------------------------------------
116 {
117 return m_MenuHandler;
118 }
119
120 //------------------------------------------------------------------------------------------------
121 void GetEntries(out notnull array<ref SCR_FactionCommanderMenuEntry> entries)
122 {
123 if (m_aChildEntries)
124 entries = m_aChildEntries;
125 }
126}
127
129class SCR_FactionCommanderTaskRootMenuEntry : SCR_FactionCommanderMenuEntry
130{
131 [Attribute("", UIWidgets.ResourceNamePicker, "", "et")]
133
134 protected typename m_TaskTypename;
135
136 //------------------------------------------------------------------------------------------------
139 {
140 return m_sTaskPrefab;
141 }
142
143 //------------------------------------------------------------------------------------------------
146 {
147 if (m_TaskTypename)
148 return m_TaskTypename;
149
150 if (m_sTaskPrefab.IsEmpty())
151 return typename.Empty;
152
153 Resource resource = BaseContainerTools.LoadContainer(m_sTaskPrefab);
154 if (!resource || !resource.IsValid())
155 {
156 Print("Task prefab resource name is not valid", LogLevel.WARNING);
157 return typename.Empty;
158 }
159
160 BaseResourceObject resourceObject = resource.GetResource();
161 if (!resourceObject)
162 return typename.Empty;
163
164 BaseContainer container = resourceObject.ToBaseContainer();
165 m_TaskTypename = container.GetClassName().ToType();
166 return m_TaskTypename;
167 }
168}
EHint
Definition EHint.c:11
SCR_DeployMenuBase m_MenuHandler
Main deploy menu with the map present.
class SCR_FactionCommanderMenuHierarchy SCR_BaseContainerCustomTitleField("m_sName")
void GetEntries(out notnull array< ref SCR_FactionCommanderMenuEntry > entries)
class SCR_FactionCommanderMenuHierarchy BaseContainerProps()
LocalizedString m_sName
SCR_InventoryMenuUI GetMenuHandler()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Object holding reference to resource. In destructor release the resource.
Definition Resource.c:25
ref array< ref SCR_FactionCommanderMenuEntry > m_aEntriesHierarchy
void GetEntries(out notnull array< ref SCR_FactionCommanderMenuEntry > entries)
ResourceName m_sTaskPrefab
GetTaskPrefabClassTypename()
ResourceName GetTaskPrefab()
m_TaskTypename
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
int IsEnabled()
Returns true if the light is enabled.