3 void ~ProfileOptionsUI()
10 m_profileOption = profileOption;
12 m_widget_array = widget_array;
14 for (
int i = 0; i < m_widget_array.Count(); i++)
16 m_widget = m_widget_array.Get(i);
19 m_widget.SetHandler(
this);
29 if (m_widget_array && m_widget_array.Count() > 0)
31 for (
int i = 0; i < m_widget_array.Count(); i++)
33 m_widget = m_widget_array.Get(i);
36 m_widget.SetHandler(NULL);
48 if (
Class.CastTo(button, m_widget) )
50 state = m_widget_array.Find(m_widget);
51 button.SetState(
g_Game.GetProfileOption(m_profileOption) == state );
60 if (
Class.CastTo(button, m_widget) )
62 state = m_widget_array.Find(m_widget);
63 SetButtonStates( state );
69 super.OnClick(w,
x,
y, button);
76 void SetButtonStates(
int index)
79 for (
int i = 0; i < m_widget_array.Count(); i++)
81 button = ButtonWidget.Cast( m_widget_array.Get(i) );
84 button.SetState( i == index );
91 return m_widget_array;
94 int GetProfileOption()
96 return m_profileOption;