5 protected ref array<ref NavigationButtonEntry> m_aEntries;
7 array<ref NavigationButtonEntry> GetEntries()
17 [
Attribute(uiwidget: UIWidgets.LocaleEditBox,
desc:
"Display name of input action")]
35 [
Attribute(
"{08CF3B69CB1ACBC4}UI/layouts/WidgetLibrary/WLib_NavigationButton.layout", UIWidgets.ResourceNamePicker,
"Layout",
"layout")]
36 protected ResourceName m_Layout;
38 [
Attribute(uiwidget: UIWidgets.Object,
desc:
"Action Buttons")]
39 ref array<ref NavigationButtonEntry> m_aEntries;
41 [
Attribute(
"{E09350C3FD7F0812}Configs/Inventory/InventoryNavigationBar.conf")]
42 ResourceName m_sConfig;
44 ref ScriptInvoker m_OnAction =
new ScriptInvoker;
57 if (entry.m_sButtonID == name && comp)
71 void SetButtonEnabled(
string sButtonName,
bool bEnable =
true,
string sName =
"" )
76 pActionButton.SetEnabled( bEnable );
77 pActionButton.GetRootWidget().SetVisible( bEnable );
79 if( !sName.IsEmpty() )
80 pActionButton.SetLabel(sName);
84 void SetButtonActionName(
string sButtonName,
string sName )
89 pActionButton.SetLabel(sName);
93 void SetAllButtonEnabled(
bool bEnable =
true )
101 entry.m_Component.SetEnabled( bEnable );
102 entry.m_Component.GetRootWidget().SetVisible( bEnable );
108 void FillFromConfig()
113 Resource res = BaseContainerTools.LoadContainer(
m_sConfig);
117 BaseContainer container = res.GetResource().ToBaseContainer();
130 protected void InitNavButtons()
134 if (entry.m_sAction ==
"Inventory_Selected")
145 entry.m_Component = comp;
146 comp.SetAction(entry.m_sAction);
147 comp.SetLabel(entry.m_sDisplayName);
148 comp.m_OnActivated.Insert(OnNavigation);
149 comp.SetClickedSound(
"");
154 override void HandlerAttached( Widget w )
156 super.HandlerAttached(w);