Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ConfigListEntries.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true)]
3{
5 protected ref array<ref SCR_ConfigListEntry> m_aEntryDefinitions;
6
7 //------------------------------------------------------------------------------------------------
8 SCR_ConfigListEntry FindEntryByTypeTag(string tag)
9 {
10 foreach (SCR_ConfigListEntry entry : m_aEntryDefinitions)
11 {
12 if (entry.GetTypeTag() == tag)
13 return entry;
14 }
15
16 return null;
17 }
18
19 //------------------------------------------------------------------------------------------------
20 SCR_ConfigListEntry FindEntryByWidgetListEntry(SCR_WidgetListEntry widgetListEntry)
21 {
22 foreach (SCR_ConfigListEntry entry : m_aEntryDefinitions)
23 {
24 if (entry.GetWidgetListEntry() == widgetListEntry)
25 return entry;
26 }
27
28 return null;
29 }
30
31 //------------------------------------------------------------------------------------------------
32 SCR_ConfigListEntry FindEntryByComponentType(typename componentType)
33 {
34 foreach (SCR_ConfigListEntry entry : m_aEntryDefinitions)
35 {
36 if (entry.GetScriptedWidgetComponentType() == componentType.ToString())
37 return entry;
38 }
39
40 return null;
41 }
42}
43
50class SCR_ConfigListEntry
51{
52 [Attribute(desc: "Name that can closer specify type of entry. E.g. Regular text field and ip text field")]
53 protected string m_sTypeTag;
54
55 [Attribute(desc: "Template that should be used for the entry type")]
56 ref protected SCR_WidgetListEntry m_WidgetListEntry;
57
58 [Attribute(desc: "Should be a type of SCR_ScriptedWidgetComponent.")]
59 protected string m_sScriptedWidgetComponentType;
60
61 //------------------------------------------------------------------------------------------------
62 string GetTypeTag()
63 {
64 return m_sTypeTag;
65 }
66
67 //------------------------------------------------------------------------------------------------
68 SCR_WidgetListEntry GetWidgetListEntry()
69 {
70 return m_WidgetListEntry;
71 }
72
73 //------------------------------------------------------------------------------------------------
74 string GetScriptedWidgetComponentType()
75 {
76 return m_sScriptedWidgetComponentType;
77 }
78}
79
81{
82 //------------------------------------------------------------------------------------------------
83 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
84 {
85 // Tag
86 string tag = "";
87 source.Get("m_sGroupTag", tag);
88
89 // Entry type
91 source.Get("m_WidgetListEntry", entry);
92
93 string entryTypeName = "*undefined*";
94 if (entry)
95 entryTypeName = entry.Type().ToString();
96
97 // Widget component
98 typename widgetComponentType;
99 source.Get("m_ScriptedWidgetComponentType", widgetComponentType);
100 string widgetComponentTypeName = "*underfined*";
101 if (widgetComponentType)
102 widgetComponentTypeName = widgetComponentType.ToString();
103
104 // Setup title string
105 title = string.Format("[tag: %1] %2 : %3", tag, entryTypeName, widgetComponentTypeName);
106
107 return true;
108 }
SCR_ConfigListEntryCustomTitle BaseContainerProps
class SCR_ConfigListEntries SCR_ConfigListEntryCustomTitle()] class SCR_ConfigListEntry
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_ConfigListEntry FindEntryByComponentType(typename componentType)
SCR_ConfigListEntry FindEntryByTypeTag(string tag)
ref array< ref SCR_ConfigListEntry > m_aEntryDefinitions
SCR_ConfigListEntry FindEntryByWidgetListEntry(SCR_WidgetListEntry widgetListEntry)
Configurable class for widget.
SCR_FieldOfViewSettings Attribute