12 [
Attribute(
"{2A736E823F7F72BB}UI/layouts/WidgetLibrary/ListBox/WLib_ListBoxIconElement.layout",
UIWidgets.ResourceNamePicker,
"List box element",
"layout")]
15 [
Attribute(
"{6F2238B8D9FDB169}UI/layouts/WidgetLibrary/ListBox/WLib_ListBoxSeparator.layout",
UIWidgets.ResourceNamePicker,
"List box separator",
"layout")]
64 comp.
SetImage(imageOrImageset, iconName);
83 m_wList.RemoveChild(elementWidget);
113 for(
int i = 0; i < count; i++)
133 for (
int i = 0; i < c; i++)
201 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
208 if (comp.GetRootWidget() == focused)
221 m_wList.GetChildren().RemoveFromHierarchy();
232 void SetItemSelected(
int item,
bool selected,
bool invokeOnChanged =
true,
bool instant =
false)
251 for (
int i = 0; i < c; i++)
281 super.HandlerAttached(w);
292 if (!itemLayout.IsEmpty())
293 selectedLayout = itemLayout;
299 comp.SetToggleable(
true);
312 newWidget.SetName(widgetName);
326 protected void _SetItemSelected(
int item,
bool selected,
bool invokeOnChanged,
bool instant =
false)
346 if (invokeOnChanged && oldSelected != selected)
347 m_OnChanged.Invoke(
this, item, selected);
ArmaReforgerScripted GetGame()
override string GetData()
Get all prefabs that have the spawner data
void Clear()
Removes all items and separators from the listbox.
array< int > GetSelectedItems(bool selected=true)
Returns IDs of selected items.
ResourceName m_sElementLayout
int GetSelectedItem()
Returns ID of currently selected item, if multiselection is disabled. Otherwise returns -1.
Managed GetItemData(int item)
bool IsItemSelected(int item)
Returns true if item with given ID is selected.
void SetItemText(int item, string text)
Widget AddSeparator(string text)
int AddItemAndIcon(string item, ResourceName imageOrImageset, string iconName, out SCR_ListBoxElementComponent outComp, Managed data=null, ResourceName itemLayout=string.Empty)
ref array< SCR_ListBoxElementComponent > m_aElementComponents
void VisualizeSelection(int item, bool selected, bool instant=false)
ResourceName m_sSeparatorLayout
override void HandlerAttached(Widget w)
int FindItemWithData(Managed data)
Returns ID of item with same user data as propvided. Returns -1 if not found or null was passed.
bool GetFocused()
Returns true when any list entry is focused.
void OnItemClick(SCR_ListBoxElementComponent comp)
SCR_ListBoxElementComponent GetElementComponent(int item)
void RemoveItem(int item)
string GetUniqueWidgetName()
int _AddItem(string item, Managed data, out SCR_ListBoxElementComponent compOut, ResourceName itemLayout=string.Empty)
VerticalLayoutWidget m_wList
void SetAllItemsSelected(bool selected, bool invokeOnChanged=true)
void SetFocusOnFirstItem()
void SetItemSelected(int item, bool selected, bool invokeOnChanged=true, bool instant=false)
void _SetItemSelected(int item, bool selected, bool invokeOnChanged, bool instant=false)
int AddItem(string item, Managed data=null, ResourceName itemLayout=string.Empty)
void SetImage(ResourceName imageOrImageset, string iconName)
void SetText(string text)
SCR_FieldOfViewSettings Attribute