36 m_ClassPath = TextWidget.Cast(root.FindAnyWidget(
"ClassPath"));
52 w.GetParent().Unlink();
56 override bool OnChange(Widget w,
int x,
int y,
bool finished)
58 super.OnChange(w,
x,
y, finished);
73 override bool OnItemSelected(Widget w,
int x,
int y,
int row,
int column,
int oldRow,
int oldColumn)
75 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
79 TextListboxWidget wgt = TextListboxWidget.Cast(w);
94 override bool OnClick(Widget w,
int x,
int y,
int button)
96 super.OnClick(w,
x,
y,button);
98 CheckBoxWidget cbw = CheckBoxWidget.Cast(w);
104 if (selectedRowIndex > -1)
108 int index = param.IndexOf(
"=");
110 paramFinal = param.Substring(0, index).Trim();
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);
242 Widget w =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/script_console/config_class_item.layout",
m_WgtClassesConfig);
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 =
GetGame().ConfigGetChildrenCount( config_path );
274 for (
int j = 0; j < objects_count; j++ )
277 GetGame().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";
349 filter_lower.ToLower();
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;
364 variable_lower.ToLower();
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 +
" ";
479 filter_lower.ToLower();
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)
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
void ScriptConsoleConfigTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
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
ButtonWidget m_SelectedRowCopy
static string m_ConfigTextField
PluginConfigDebugProfile m_ConfigDebugProfile
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
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