Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FieldManualPiece_ConfigEntryList.c
Go to the documentation of this file.
1[BaseContainerProps(), SCR_BaseContainerStaticTitleField(customTitle: "Config Entry List")]
3{
4 [Attribute()]
5 protected ref array<ref SCR_FieldManualPiece_ConfigEntry> m_aConfigEntries;
6
7 [Attribute(defvalue: "{A89964BD3E21BEED}UI/layouts/Menus/FieldManual/Pieces/FieldManual_Piece_ConfigEntryList.layout", uiwidget: UIWidgets.EditBoxWithButton, params: "layout")]
9
10 //------------------------------------------------------------------------------------------------
11 // constructor
13 {
14 if (!m_aConfigEntries) // can be config-provided
15 {
17 }
18 }
19
20 //------------------------------------------------------------------------------------------------
21 override void CreateWidget(notnull Widget parent)
22 {
23 WorkspaceWidget workspace = GetGame().GetWorkspace();
24
25 Widget createdWidget = workspace.CreateWidgets(m_Layout, parent);
26 if (!createdWidget)
27 {
28 Print("could not create Config Entry List widget | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.WARNING);
29 return;
30 }
31
32 Widget configEntriesLayout = SCR_WidgetHelper.GetWidgetOrChild(createdWidget, "ConfigEntriesLayout");
33 if (configEntriesLayout)
34 CreateConfigEntries(configEntriesLayout);
35 }
36
37 //------------------------------------------------------------------------------------------------
38 protected void CreateConfigEntries(Widget configEntriesLayout)
39 {
40 SCR_WidgetHelper.RemoveAllChildren(configEntriesLayout);
41
42 if (!m_aConfigEntries || m_aConfigEntries.IsEmpty())
43 return;
44
45 for (int i, cnt = m_aConfigEntries.Count(); i < cnt; i++)
46 {
47 m_aConfigEntries[i].CreateWidget(configEntriesLayout);
48 }
49 }
50}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void CreateConfigEntries()
Adds entries as defined in the hierarchy config (stored in SCR_Faction).
Attribute to manually set a static title.
Definition Attributes.c:11
ResourceName m_Layout
void SCR_FieldManualPiece_ConfigEntryList()
override void CreateWidget(notnull Widget parent)
ref array< ref SCR_FieldManualPiece_ConfigEntry > m_aConfigEntries
void CreateConfigEntries(Widget configEntriesLayout)
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