Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditorContentBrowserDisplayConfig.c
Go to the documentation of this file.
1
4[BaseContainerProps(configRoot: true)]
6{
7 [Attribute(desc: "Sets the header of the content browser. Leaving this empty keeps the default header.", UIWidgets.LocaleEditBox)]
9
10 [Attribute(desc: "List of Label groups that can be shown in the Content browser. If not empty then only these groups can be shown, If empty all groups can be shown.")]
11 protected ref array<ref SCR_EditorContentBrowserDisplayGroupLabel> m_aWhiteListLabelGroups;
12
13 [Attribute(desc: "List of labels that are active when the content browser is opened and can never be removed (These labels will never be shown and cannot be disabled).")]
14 protected ref array<ref SCR_EditorContentBrowserActiveDisplayLabel> m_aAlwaysActiveLabels;
15
16 [Attribute(desc: "List of Labels that can be shown in the Content browser. If not empty then only these lables can be shown, If empty all labels can be shown. (Unless always active label hides it)")]
17 protected ref array<ref SCR_EditorContentBrowserDisplayLabel> m_aWhiteListLabels;
18
19 [Attribute(desc: "Should the browser opened with this config save it's state", defvalue: "1")]
21
30
37 {
38 //~ Search label is white list
39 if (!m_aWhiteListLabelGroups.IsEmpty())
40 {
41 bool groupLabelFound = false;
42
44 {
45 //~ Found group label in white list
46 if (whiteGroupLabel.GetGroupLabel() == groupLabel)
47 {
48 //~ Check if white label was actually enabled
49 if (whiteGroupLabel.GetEnabled())
50 groupLabelFound = true;
51
52 break;
53 }
54 }
55
56 //White label not found so return false
57 if (!groupLabelFound)
58 return false;
59 }
60
61 return true;
62 }
63
70 {
71 //~ Search label is white list
72 if (!m_aWhiteListLabels.IsEmpty())
73 {
74 bool labelFound = false;
75
77 {
78 //~ Found label in white list
79 if (whiteLabel.GetLabel() == label)
80 {
81 //~ Check if white label was actually enabled
82 if (whiteLabel.IsEnabled())
83 labelFound = true;
84
85 break;
86 }
87 }
88 //White label not found so return false
89 if (!labelFound)
90 return false;
91 }
92
93 //~ Is always active label so check if can be shown
94 if (!m_aAlwaysActiveLabels.IsEmpty())
95 {
97 {
98 if (alwaysActiveLabel.GetLabel() == label)
99 {
100 if (alwaysActiveLabel.IsEnabled() && !alwaysActiveLabel.m_bShowLabel)
101 return false;
102
103 break;
104 }
105 }
106 }
107
108 return true;
109 }
110
115 void GetAlwaysActiveLabels(out notnull array<EEditableEntityLabel> alwaysActiveLabels)
116 {
118 alwaysActiveLabels.Insert(label.GetLabel());
119 }
120
125 void GetWhiteListeLabels(out notnull array<EEditableEntityLabel> whitelistLabels)
126 {
128 whitelistLabels.Insert(label.GetLabel());
129 }
130
135 void GetWhiteListeLabelGroups(out notnull array<EEditableEntityLabelGroup> whitelistLabelGroups)
136 {
138 whitelistLabelGroups.Insert(label.GetGroupLabel());
139 }
140
147 {
148 //~ No always active labels
149 if (m_aAlwaysActiveLabels.IsEmpty())
150 return false;
151
153 {
154 //~ Found label in alwaysActive List
155 if (alwaysActiveLabel.GetLabel() == label)
156 {
157 //~ Always active label is enabled so return true
158 if (alwaysActiveLabel.IsEnabled())
159 return true;
160
161 break;
162 }
163 }
164
165 //~ Always active label not found or was not enabled
166 return false;
167 }
168
169
176 {
177 SCR_EditorContentBrowserActiveDisplayLabel alwaysActiveLabelClass;
178
180 {
181 if (alwaysActiveLabel.GetLabel() != label)
182 continue;
183
184 if (!alwaysActiveLabel.IsEnabled())
185 return true;
186
187 alwaysActiveLabelClass = SCR_EditorContentBrowserActiveDisplayLabel.Cast(alwaysActiveLabel);
188 if (!alwaysActiveLabelClass)
189 return false;
190
191 return alwaysActiveLabelClass.m_bShowLabel;
192 }
193
194 return true;
195 }
196
205
214 void SCR_EditorContentBrowserDisplayConfig(array<EEditableEntityLabelGroup> whiteListGroupLabels = null, array<EEditableEntityLabel> whiteListLabels = null, array<EEditableEntityLabel> alwaysActiveLabels = null, bool saveContentBrowserState = false, LocalizedString browserHeader = string.Empty)
215 {
216 // Return when called with empty arguments
217 if (browserHeader.IsEmpty())
218 return;
219
220 m_sContentBrowserHeader = browserHeader;
221
223 //~ Create White list Group
224 if (whiteListGroupLabels)
225 {
226 foreach (EEditableEntityLabelGroup groupLabel: whiteListGroupLabels)
227 {
229 }
230 }
231
233 //~ Create white list labels
234 if (whiteListLabels)
235 {
236 foreach (EEditableEntityLabel label: whiteListLabels)
237 {
239 }
240 }
241
243 //~ Create Always active labels
244 if (alwaysActiveLabels)
245 {
246 foreach(EEditableEntityLabel label: alwaysActiveLabels)
247 {
249 }
250 }
251
252 //~ If this config allows for saving of the Content Browser state. If this config is temporarly created then keep it false
253 m_bSaveContentBrowserState = saveContentBrowserState;
254 }
255};
256
259{
260 [Attribute(uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EEditableEntityLabelGroup))]
262
263 [Attribute("1", desc: "If false then this label group will be ignored in the list")]
264 protected bool m_bEnabled;
265
274
280 {
281 return m_bEnabled;
282 }
283
285 {
286 if (groupLabel == EEditableEntityLabelGroup.NONE)
287 return;
288
289 m_iGroupLabel = groupLabel;
290 m_bEnabled = true;
291 }
292};
293
296{
297 [Attribute(uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EEditableEntityLabel))]
299
300 [Attribute("1", desc: "If false then this label will be ignored in the list")]
301 protected bool m_bEnabled;
302
308 {
309 return m_iLabel;
310 }
311
317 {
318 return m_bEnabled;
319 }
320
322 {
323 if (label == EEditableEntityLabel.NONE)
324 return;
325
326 m_iLabel = label;
327 m_bEnabled = true;
328 }
329};
330
333{
334 [Attribute("0", desc: "If false then this label will hidden in filters and will always be forced to be active (if enabled)")]
335 bool m_bShowLabel;
336};
EEditableEntityLabel
EEditableEntityLabelGroup
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ref array< ref SCR_EditorContentBrowserDisplayGroupLabel > m_aWhiteListLabelGroups
void GetWhiteListeLabels(out notnull array< EEditableEntityLabel > whitelistLabels)
void GetAlwaysActiveLabels(out notnull array< EEditableEntityLabel > alwaysActiveLabels)
ref array< ref SCR_EditorContentBrowserDisplayLabel > m_aWhiteListLabels
ref array< ref SCR_EditorContentBrowserActiveDisplayLabel > m_aAlwaysActiveLabels
bool CanShowLabelGroup(EEditableEntityLabelGroup groupLabel)
void GetWhiteListeLabelGroups(out notnull array< EEditableEntityLabelGroup > whitelistLabelGroups)
void SCR_EditorContentBrowserDisplayConfig(array< EEditableEntityLabelGroup > whiteListGroupLabels=null, array< EEditableEntityLabel > whiteListLabels=null, array< EEditableEntityLabel > alwaysActiveLabels=null, bool saveContentBrowserState=false, LocalizedString browserHeader=string.Empty)
void SCR_EditorContentBrowserDisplayGroupLabel(EEditableEntityLabelGroup groupLabel=EEditableEntityLabelGroup.NONE)
void SCR_EditorContentBrowserDisplayLabel(EEditableEntityLabel label=EEditableEntityLabel.NONE)
SCR_FieldOfViewSettings Attribute