16 m_BtnOk = ButtonWidget.Cast( wgt.FindAnyWidget(
"btn_ppp_pc_ok") );
43 int selected_row_index = text_listbox_widget.GetSelectedRow();
44 if ( selected_row_index != -1 )
47 text_listbox_widget.GetItemText( selected_row_index, 0, item_name );
60 string path = config_params.param4;
62 for (
int i = 0; i < variables.Count(); i++ )
82 string config_path = config_params.param4;
83 int deep = config_params.param5;
86 for (
int i = 0; i < deep; i++)
88 offset = offset +
" ";
93 int childrens_count = variables.Count();
96 offset = offset +
" ";
101 for ( i = variables.Count() - 1; i >= 0; i-- )
103 string new_config_path = ( config_path +
" " + variables.
Get(i) ).Trim();
121 int deep = config_params.param5;
122 int deep_next = config_params_next.param5;
124 int remove_lines_count = 0;
126 for (
int i = row + 1; i < max_count; i++)
128 if ( deep < deep_next && i <= max_count )
130 remove_lines_count = remove_lines_count + 1;
132 deep_next = config_params_next.param5;
138 for ( i = 1; i < remove_lines_count; i++ )
148 for ( i = 0; i < deep; i++)
150 offset = offset +
" ";
167 string config_path =
"configfile";
169 for (
int i = 0; i < variables.Count(); i++ )
171 string variable = variables.Get(i);
173 for (
int j = 0; j < base_classes.Count(); j++ )
175 if ( variable == base_classes.
Get(j) )
177 string new_config_path = ( config_path +
" " + variable ).Trim();
190 string config_base_path =
"configfile";
199 filter_lower.
Split(
" ", filters );
201 for (
int i = 0; i < base_classes.Count(); i++ )
203 string config_path = config_base_path +
" " + base_classes.
Get(i);
206 for (
int j = 0; j < variables.Count(); j++ )
208 string variable = variables.Get(j);
209 string variable_lower = variable;
212 for (
int k = 0; k < filters.Count(); k++ )
214 if ( variable_lower.
Contains(filters.Get(k)))
216 string new_config_path = ( config_path +
" " + variable ).Trim();
227 super.OnChange( w,
x,
y, finished );
239 super.OnClick( w,
x,
y, button );
265 if ( config_params.param1 ==
false )
class OptionSelectorMultistate extends OptionSelector class_name
PluginBase GetPlugin(typename plugin_type)
Param5< bool, string, int, string, int > ConfigParams
proto native void CopyToClipboard(string text)
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto native CGame GetGame()
array< string > TStringArray
proto string Get(int index)
Gets n-th character from string.
bool Contains(string sample)
Returns true if sample is substring of string.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto int ToLower()
Changes string to lowercase. Returns length.