12 Error(
"Invalid OptionSelectorMultistate options");
15 m_SelectedOptionIndex = 0;
19 m_SelectedOption.SetText(m_Options.Get(m_SelectedOptionIndex));
30 int idx = m_SelectedOptionIndex;
32 if (
idx >= m_Options.Count())
35 m_AttemptOptionChange.Invoke(
idx);
42 int idx = m_SelectedOptionIndex;
45 idx = m_Options.Count() - 1;
47 m_AttemptOptionChange.Invoke(
idx);
54 m_SelectedOptionIndex =
index;
55 m_SelectedOption.SetText(m_Options.Get(
index));
56 m_OptionChanged.Invoke(
index);
73 m_SelectedOptionIndex =
value;
74 m_SelectedOption.SetText(m_Options.Get(m_SelectedOptionIndex));
76 m_OptionChanged.Invoke(m_SelectedOptionIndex);
85 m_SelectedOptionIndex =
index;
86 m_SelectedOption.SetText(m_Options.Get(m_SelectedOptionIndex));
88 m_OptionChanged.Invoke(m_SelectedOptionIndex);
95 m_SelectedOption.SetText(m_Options.Get(m_SelectedOptionIndex));
96 m_OptionChanged.Invoke(m_SelectedOptionIndex);
101 return m_SelectedOptionIndex;
109 m_SelectedOptionIndex =
index;
110 m_SelectedOption.SetText(m_Options.Get(m_SelectedOptionIndex));
113 m_OptionChanged.Invoke(m_SelectedOptionIndex);
134 m_SelectedOption.SetText(
"#str_cfgvehicles_survivorM0");
135 else if (
value ==
"Female")
136 m_SelectedOption.SetText(
"#str_cfgvehicles_survivorF0");
140 m_SelectedOption.SetText(
"NO ITEM - localization needed!");
175 while (
GetGame().ConfigGetBaseName(
"cfgVehicles " +
child, parent))
186 super.SetNextOption();
192 super.SetPrevOption();
210 super.SetRandomValue();
void SetTextSmart(string value)
override void SetValue(int value, bool fire_event=true)
bool InheritsFrom(string value, string baseclass)
void OptionSelectorMultistateCharacterMenu(Widget parent, int current_index, ScriptedWidgetEventHandler parent_c, bool disabled, notnull array< string > options)
class OptionSelectorMultistate extends OptionSelector class_name
override void SetStringOption(string option, bool fire_event=true)
override void SetNextOption()
void SetDisplayNameText(string value, string appendix)
override void SetPrevOption()
override void SetRandomValue()
override void SetNextOption()
override void SetStringOption(string option, bool fire_event=true)
void SetCanSwitch(bool value)
void LoadNewValues(notnull array< string > options, int current_index)
void SetValue(int value, bool fire_event=true)
override void SetPrevOption()
void SetValue(string value, bool fire_event=true)
void PerformSetOption(int index)
void OptionSelectorMultistate(Widget parent, int current_index, ScriptedWidgetEventHandler parent_c, bool disabled, notnull array< string > options)
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].