5 bool m_bDefaultSelected =
true;
8 protected int m_iCurrentIndex;
9 protected ref array<SCR_ButtonImageComponent> m_aButtons =
new array<SCR_ButtonImageComponent>();
11 ref ScriptInvoker m_OnSortingChange =
new ScriptInvoker();
13 override void HandlerAttached(Widget w)
15 super.HandlerAttached(w);
17 m_CurrentSelection =
m_aButtons[m_iCurrentIndex];
19 m_aButtons[m_iCurrentIndex].SetToggled(
true,
false,
false);
23 protected override void ListenToSelectables(notnull array<Widget> aWidgets)
25 foreach (Widget w : aWidgets)
31 comp.m_OnToggled.Insert(OnSorting);
36 int GetSelectedIndex()
38 return m_iCurrentIndex;
46 if (m_CurrentSelection)
47 m_CurrentSelection.SetToggled(
false,
true,
false);
48 m_CurrentSelection = comp;
50 m_iCurrentIndex =
index;
54 m_CurrentSelection.SetToggled(
true,
false,
false);
58 m_OnSortingChange.Invoke(
index);