5 ref array<string> m_aElementsFilters;
9 protected ref array<ref Widget> m_aWidgetCells =
new array<ref Widget>();
10 protected ref array<ref SCR_SelectableButtonComponent> m_aButtons =
new array<ref SCR_SelectableButtonComponent>();
12 protected bool m_bIsFocused =
false;
13 protected bool m_bIsAscendent;
15 ref ScriptInvoker m_OnFocus =
new ScriptInvoker();
18 override void HandlerAttached(Widget w)
30 button.SetSelected(
false);
37 if(m_iSelectedItem > -1)
48 protected void AddWidgetCells()
50 foreach (
string str : m_aElementNames)
52 Widget w =
m_wRoot.FindAnyWidget(str);
59 button.m_OnClicked.Insert(OnElementClicked);
66 protected void OnElementClicked(Widget w)
82 button.SetSelected(
false);
85 SetCurrentItem(buttonId,
true,
true);
93 if (m_wLastFocused == button)
94 m_bIsAscendent = !m_bIsAscendent;
96 m_bIsAscendent =
false;
98 m_wLastFocused = button;
100 if(m_aElementsFilters && buttonId < m_aElementsFilters.Count())
101 m_OnChanged.Invoke(m_aElementsFilters[buttonId], m_bIsAscendent);
105 Widget GetLastFocusedButton()
109 return m_wLastFocused.m_wRoot;