52 w.GetParent().Unlink();
58 super.OnChange(w,
x,
y, finished);
75 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
79 TextListboxWidget wgt = TextListboxWidget.Cast(w);
96 super.OnClick(w,
x,
y,button);
98 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
104 if (selectedRowIndex > -1)
108 int index = param.
IndexOf(
"=");
113 int objects_row_index;
119 string path = params.param4;
121 path.Split(
" ", pathArr);
124 foreach (
int indx,
string s:pathArr)
128 relativePath+= s+
" ";
133 relativePath = relativePath.
Trim();
154 if (config_params.param1 ==
false)
164 m_Row = objects_row_index;
184 if (index_toggled == -1)
190 new_flag = (flag | (
int)
Math.
Pow(2, checkbox_index));
194 else if (index_toggled != -1)
200 new_flag = (flag ^ (
int)
Math.
Pow(2, checkbox_index));
225 super.Update(timeslice);
243 CheckBoxWidget cbw = CheckBoxWidget.Cast(w.FindAnyWidget(
"Item"));
250 if (flag1 & (
int)
Math.
Pow(2, indx))
254 cbw.SetChecked(
true);
262 protected void DumpParam(
string param,
string relativePath)
266 relativePath =
" " + relativePath;
272 int objects_count =
g_Game.ConfigGetChildrenCount( config_path );
274 for (
int j = 0; j < objects_count; j++ )
277 g_Game.ConfigGetChildName( config_path, j, child_name );
283 string path = config_path +
" " + child_name + relativePath +
" " + param;
288 Print(child_name +
"," + param +
"," + value);
323 string config_path =
"configfile";
325 for (
int i = 0; i < variables.Count(); i++)
327 string variable = variables.Get(i);
333 string new_config_path = (config_path +
" " + variable).Trim();
346 string config_base_path =
"configfile";
352 filter_lower.
Split(
" ", filters);
357 string config_path = config_base_path +
" " + config_root;
360 for (
int j = 0; j < variables.Count(); j++)
362 string variable = variables.Get(j);
363 string variable_lower = variable;
366 for (
int k = 0; k < filters.Count(); k++)
368 if (variable_lower.
Contains(filters.Get(k)))
370 string new_config_path = (config_path +
" " + variable).Trim();
392 string config_path = config_params.param4;
393 int deep = config_params.param5;
397 for (
int i = 0; i < deep; i++)
399 offset = offset +
" ";
404 int childrens_count = variables.Count();
407 offset = offset +
" ";
412 for (i = variables.Count() - 1; i >= 0; i--)
414 string new_config_path = (config_path +
" " + variables.Get(i)).Trim();
432 if (!config_params || !config_params_next)
434 int deep = config_params.param5;
435 int deep_next = config_params_next.param5;
437 int remove_lines_count = 0;
439 for (
int i = row + 1; i < max_count; i++)
441 if (deep < deep_next && i <= max_count)
443 remove_lines_count = remove_lines_count + 1;
445 deep_next = config_params_next.param5;
451 for (i = 1; i < remove_lines_count; i++)
461 for (i = 0; i < deep; i++)
463 offset = offset +
" ";
482 filter_lower.
Split(
" ", filters);
489 string path = config_params.param4;
492 for (
int i = 0; i < variables.Count(); i++)
494 string var = variables.Get(i);
496 if (filters.Count() == 0)
502 foreach (
string f: filters)
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc.
override bool OnChange(Widget w, int x, int y, bool finished)
TextListboxWidget m_ConfigVariablesTextListbox
override void Update(float timeslice)
static string m_VariableTextField
static string m_ConfigTextField
void ChangeConfigFilter()
void FindInHierarchy(string class_name)
PluginConfigViewer m_ModuleConfigViewer
ref map< CheckBoxWidget, int > m_ClassCheckboxes
TextListboxWidget m_ConfigHierarchyTextListbox
void CollapseHierarchy(int row)
Widget m_WgtClassesConfig
void DumpParam(string param, string relativePath)
ButtonWidget m_DumpParamButton
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
void ScriptConsoleConfigTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
static ref ConfigParamsEx m_ConfigData
void RenderVariables(int row)
ref TStringArray m_BaseConfigClasses
EditBoxWidget m_ObjectConfigFilter
EditBoxWidget m_VariableConfigFilter
void ExpandHierarchy(int row)
ref TStringArray m_BaseConfigClassesToggled
override bool OnClick(Widget w, int x, int y, int button)
void ~ScriptConsoleConfigTab()
ButtonWidget m_SelectedRowCopy
PluginConfigDebugProfile m_ConfigDebugProfile
void ScriptConsoleTabBase(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
static proto float Pow(float v, float power)
Return power of v ^ power.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'.
bool Contains(string sample)
Returns true if sample is substring of string.
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.
proto int ToLower()
Changes string to lowercase.
class OptionSelectorMultistate extends OptionSelector class_name
PluginBase GetPlugin(typename plugin_type)
Param5< bool, string, int, string, int > ConfigParams
Param6< bool, string, int, string, int, string > ConfigParamsEx