29 super.InitializeTab(root, console, button, parent);
54 w.GetParent().Unlink();
60 super.OnChange(w,
x,
y, finished);
77 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
81 TextListboxWidget wgt = TextListboxWidget.Cast(w);
98 super.OnClick(w,
x,
y,button);
100 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
106 if (selectedRowIndex > -1)
110 int index = param.
IndexOf(
"=");
115 int objects_row_index;
121 string path = params.param4;
123 path.Split(
" ", pathArr);
126 foreach (
int indx,
string s:pathArr)
130 relativePath+= s+
" ";
135 relativePath = relativePath.
Trim();
156 if (config_params.param1 ==
false)
166 m_Row = objects_row_index;
186 if (index_toggled == -1)
192 new_flag = (flag | (
int)
Math.
Pow(2, checkbox_index));
196 else if (index_toggled != -1)
202 new_flag = (flag ^ (
int)
Math.
Pow(2, checkbox_index));
227 super.Update(timeslice);
245 CheckBoxWidget cbw = CheckBoxWidget.Cast(w.FindAnyWidget(
"Item"));
252 if (flag1 & (
int)
Math.
Pow(2, indx))
256 cbw.SetChecked(
true);
264 protected void DumpParam(
string param,
string relativePath)
268 relativePath =
" " + relativePath;
274 int objects_count =
g_Game.ConfigGetChildrenCount( config_path );
276 for (
int j = 0; j < objects_count; j++ )
279 g_Game.ConfigGetChildName( config_path, j, child_name );
285 string path = config_path +
" " + child_name + relativePath +
" " + param;
290 Print(child_name +
"," + param +
"," + value);
325 string config_path =
"configfile";
327 for (
int i = 0; i < variables.Count(); i++)
329 string variable = variables.Get(i);
335 string new_config_path = (config_path +
" " + variable).Trim();
348 string config_base_path =
"configfile";
354 filter_lower.
Split(
" ", filters);
359 string config_path = config_base_path +
" " + config_root;
362 for (
int j = 0; j < variables.Count(); j++)
364 string variable = variables.Get(j);
365 string variable_lower = variable;
368 for (
int k = 0; k < filters.Count(); k++)
370 if (variable_lower.
Contains(filters.Get(k)))
372 string new_config_path = (config_path +
" " + variable).Trim();
394 string config_path = config_params.param4;
395 int deep = config_params.param5;
399 for (
int i = 0; i < deep; i++)
401 offset = offset +
" ";
406 int childrens_count = variables.Count();
409 offset = offset +
" ";
414 for (i = variables.Count() - 1; i >= 0; i--)
416 string new_config_path = (config_path +
" " + variables.
Get(i)).Trim();
434 if (!config_params || !config_params_next)
436 int deep = config_params.param5;
437 int deep_next = config_params_next.param5;
439 int remove_lines_count = 0;
441 for (
int i = row + 1; i < max_count; i++)
443 if (deep < deep_next && i <= max_count)
445 remove_lines_count = remove_lines_count + 1;
447 deep_next = config_params_next.param5;
453 for (i = 1; i < remove_lines_count; i++)
463 for (i = 0; i < deep; i++)
465 offset = offset +
" ";
484 filter_lower.
Split(
" ", filters);
491 string path = config_params.param4;
494 for (
int i = 0; i < variables.Count(); i++)
496 string var = variables.Get(i);
498 if (filters.Count() == 0)
504 foreach (
string f: filters)
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
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
override bool OnClick(Widget w, int x, int y, int button)
override bool OnChange(Widget w, int x, int y, bool finished)
TextListboxWidget m_ConfigVariablesTextListbox
void FindInHierarchy(string class_name)
void DumpParam(string param, string relativePath)
override void Update(float timeslice)
void RenderVariables(int row)
ref TStringArray m_BaseConfigClasses
ref map< CheckBoxWidget, int > m_ClassCheckboxes
Widget m_WgtClassesConfig
EditBoxWidget m_VariableConfigFilter
TextListboxWidget m_ConfigHierarchyTextListbox
static string m_VariableTextField
void ~ScriptConsoleConfigTab()
EditBoxWidget m_ObjectConfigFilter
void ExpandHierarchy(int row)
void ChangeConfigFilter()
void CollapseHierarchy(int row)
PluginConfigViewer m_ModuleConfigViewer
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
static ref ConfigParamsEx m_ConfigData
ref TStringArray m_BaseConfigClassesToggled
ButtonWidget m_DumpParamButton
override void InitializeTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
ButtonWidget m_SelectedRowCopy
static string m_ConfigTextField
PluginConfigDebugProfile m_ConfigDebugProfile
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
proto void Print(void var)
Prints content of variable to console/log.
class array< Class T > TStringArray
static proto float Pow(float v, float power)
Return power of v ^ power.
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.
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 string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.
proto int ToLower()
Changes string to lowercase. Returns length.