5 protected ref array<ref SCR_FieldManualPiece_ConfigEntry> m_aConfigEntries;
7 [
Attribute(defvalue:
"{A89964BD3E21BEED}UI/layouts/Menus/FieldManual/Pieces/FieldManual_Piece_ConfigEntryList.layout", uiwidget: UIWidgets.EditBoxWithButton,
params:
"layout")]
8 protected ResourceName m_Layout;
14 if (!m_aConfigEntries)
16 m_aConfigEntries = {};
21 override void CreateWidget(notnull Widget parent)
23 WorkspaceWidget workspace =
GetGame().GetWorkspace();
25 Widget createdWidget = workspace.CreateWidgets(
m_Layout, parent);
28 Print(
"could not create Config Entry List widget | " + FilePath.StripPath(__FILE__) +
":" + __LINE__, LogLevel.WARNING);
32 Widget configEntriesLayout =
SCR_WidgetHelper.GetWidgetOrChild(createdWidget,
"ConfigEntriesLayout");
33 if (configEntriesLayout)
34 CreateConfigEntries(configEntriesLayout);
38 protected void CreateConfigEntries(Widget configEntriesLayout)
42 if (!m_aConfigEntries || m_aConfigEntries.IsEmpty())
45 for (
int i, cnt = m_aConfigEntries.Count(); i < cnt; i++)
47 m_aConfigEntries[i].CreateWidget(configEntriesLayout);