Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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")]
8  protected ResourceName m_Layout;
9 
10  //------------------------------------------------------------------------------------------------
11  // constructor
13  {
14  if (!m_aConfigEntries) // can be config-provided
15  {
16  m_aConfigEntries = {};
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 }
SCR_BaseContainerStaticTitleField
Attribute to manually set a static title.
Definition: Attributes.c:10
SCR_FieldManualPiece
Definition: SCR_FieldManualPiece.c:2
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
m_Layout
ResourceName m_Layout
Definition: SCR_ActionsToolbarEditorUIComponent.c:6
SCR_WidgetHelper
Definition: SCR_WidgetHelper.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_FieldManualPiece_ConfigEntryList
Definition: SCR_FieldManualPiece_ConfigEntryList.c:2
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468