Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ConfigListComponent.c
Go to the documentation of this file.
1
4
5
class
SCR_ConfigListComponent
:
ScriptedWidgetComponent
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
;
14
protected
ScrollLayoutWidget
m_wScrollWidget
;
15
protected
VerticalLayoutWidget
m_wList
;
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
)
28
m_wList
=
VerticalLayoutWidget
.Cast(w);
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
{
39
foreach
(
SCR_WidgetListEntry
entry :
m_aInitialEntryList
)
40
{
41
entry.RemoveWidget();
42
}
43
}
44
45
//-------------------------------------------------------------------------------------------
46
// API
47
//-------------------------------------------------------------------------------------------
48
49
//-------------------------------------------------------------------------------------------
50
array<ref SCR_WidgetListEntry>
GetInitialEntryList
()
51
{
52
return
m_aInitialEntryList
;
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
//-------------------------------------------------------------------------------------------
82
Widget
GetInvalidEntry
()
83
{
84
// Go through entries list
85
for
(
int
i = 0, count =
m_aInitialEntryList
.Count(); i < count; i++)
86
{
87
if
(!
m_aInitialEntryList
[i].
CheckValidity
())
88
{
89
// Invalid entry widget
90
return
m_aInitialEntryList
[i].GetEntryRoot();
91
}
92
}
93
94
// Is valid
95
return
null;
96
}
97
};
CheckValidity
override bool CheckValidity()
Definition
SCR_WidgetListEntry.c:10
SCR_ConfigListComponent
Definition
SCR_ConfigListComponent.c:6
SCR_ConfigListComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_ConfigListComponent.c:22
SCR_ConfigListComponent::m_wList
VerticalLayoutWidget m_wList
Definition
SCR_ConfigListComponent.c:15
SCR_ConfigListComponent::m_aInitialEntryList
ref array< ref SCR_WidgetListEntry > m_aInitialEntryList
Definition
SCR_ConfigListComponent.c:11
SCR_ConfigListComponent::GetInitialEntryList
array< ref SCR_WidgetListEntry > GetInitialEntryList()
Definition
SCR_ConfigListComponent.c:50
SCR_ConfigListComponent::m_wScrollWidget
ScrollLayoutWidget m_wScrollWidget
Definition
SCR_ConfigListComponent.c:14
SCR_ConfigListComponent::m_sListParent
string m_sListParent
Definition
SCR_ConfigListComponent.c:8
SCR_ConfigListComponent::m_Root
Widget m_Root
Definition
SCR_ConfigListComponent.c:13
SCR_ConfigListComponent::FindEntry
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...
Definition
SCR_ConfigListComponent.c:57
SCR_ConfigListComponent::HandlerDeattached
override void HandlerDeattached(Widget w)
Definition
SCR_ConfigListComponent.c:37
SCR_ConfigListComponent::GetInvalidEntry
Widget GetInvalidEntry()
Definition
SCR_ConfigListComponent.c:82
SCR_WidgetListEntry
Configurable class for widget.
Definition
SCR_WidgetListEntry.c:116
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
ScrollLayoutWidget
Definition
ScrollLayoutWidget.c:16
VerticalLayoutWidget
Definition
VerticalLayoutWidget.c:13
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
Menu
ServerBrowser
ServerHosting
SCR_ConfigListComponent.c
Generated by
1.17.0