Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ConfigListComponent.c
Go to the documentation of this file.
1
4
6{
7 [Attribute("VerticalLayout")]
8 protected string m_sListParent;
9
10 [Attribute()]
11 protected ref array<ref SCR_WidgetListEntry> m_aInitialEntryList;
12
13 protected Widget m_Root;
16
17 //-------------------------------------------------------------------------------------------
18 // Overridden widget api
19 //-------------------------------------------------------------------------------------------
20
21 //-------------------------------------------------------------------------------------------
22 override void HandlerAttached(Widget w)
23 {
24 m_Root = w;
25
26 m_wList = VerticalLayoutWidget.Cast(w.FindAnyWidget(m_sListParent));
27 if (!m_wList)
29
30 for (int i = 0, count = m_aInitialEntryList.Count(); i < count; i++)
31 {
32 m_aInitialEntryList[i].CreateWidget(m_wList);
33 }
34 }
35
36 //-------------------------------------------------------------------------------------------
37 override void HandlerDeattached(Widget w)
38 {
40 {
41 entry.RemoveWidget();
42 }
43 }
44
45 //-------------------------------------------------------------------------------------------
46 // API
47 //-------------------------------------------------------------------------------------------
48
49 //-------------------------------------------------------------------------------------------
50 array<ref SCR_WidgetListEntry> GetInitialEntryList()
51 {
53 }
54
55 //-------------------------------------------------------------------------------------------
57 SCR_WidgetListEntry FindEntry(string propertyName, string groupTag = "")
58 {
59 for (int i = 0, count = m_aInitialEntryList.Count(); i < count; i++)
60 {
61 if (groupTag == "")
62 {
63 // Has given property name
64 if (m_aInitialEntryList[i].GetPropertyName() == propertyName)
65 return m_aInitialEntryList[i];
66 }
67 else
68 {
69 // Has propery and group
70 if (m_aInitialEntryList[i].GetPropertyName() == propertyName && m_aInitialEntryList[i].GetGroupTag() == groupTag)
71 return m_aInitialEntryList[i];
72 }
73 }
74
75 return null;
76 }
77
78 //-------------------------------------------------------------------------------------------
83 {
84 // Go through entries list
85 for (int i = 0, count = m_aInitialEntryList.Count(); i < count; i++)
86 {
88 {
89 // Invalid entry widget
90 return m_aInitialEntryList[i].GetEntryRoot();
91 }
92 }
93
94 // Is valid
95 return null;
96 }
97};
override bool CheckValidity()
override void HandlerAttached(Widget w)
ref array< ref SCR_WidgetListEntry > m_aInitialEntryList
array< ref SCR_WidgetListEntry > GetInitialEntryList()
SCR_WidgetListEntry FindEntry(string propertyName, string groupTag="")
Find variable of given property name and group tag - no group tag find any variable of given property...
override void HandlerDeattached(Widget w)
Configurable class for widget.
SCR_FieldOfViewSettings Attribute