DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ExpandHierarchy()

void ScriptConsoleConfigTab::ExpandHierarchy ( int row)
inlineprotected

См. определение в файле ScriptConsoleConfigTab.c строка 381

382 {
383 if (row <= -1 && row >= m_ConfigHierarchyTextListbox.GetNumItems())
384 {
385 return;
386 }
387
388 TStringArray variables;
389
390 // get current row data
391 ConfigParamsEx config_params;
392 m_ConfigHierarchyTextListbox.GetItemData(row, 0, config_params);
393
394 string config_path = config_params.param4;
395 int deep = config_params.param5;
396
397
398 string offset = "";
399 for (int i = 0; i < deep; i++)
400 {
401 offset = offset + " ";
402 }
403
404 // change selected node
405 variables = m_ModuleConfigViewer.GetConfigHierarchy(config_path);
406 int childrens_count = variables.Count();
407 m_ConfigHierarchyTextListbox.SetItem(row, offset + "- " + config_params.param2, new ConfigParamsEx(true, config_params.param2, childrens_count, config_path, deep,config_params.param6), 0);
408
409 offset = offset + " ";
410
411 // render children
412 deep = deep + 1;
413 childrens_count = 0;
414 for (i = variables.Count() - 1; i >= 0; i--)
415 {
416 string new_config_path = (config_path + " " + variables.Get(i)).Trim();
417 m_ConfigHierarchyTextListbox.AddItem(offset + "+ " + variables.Get(i), new ConfigParamsEx(false, variables.Get(i), childrens_count, new_config_path, deep,config_params.param2), 0, (row + 1));
418 }
419 }
Param6< bool, string, int, string, int, string > ConfigParamsEx
Определения ScriptConsoleConfigTab.c:2
TextListboxWidget m_ConfigHierarchyTextListbox
Определения ScriptConsoleConfigTab.c:16
PluginConfigViewer m_ModuleConfigViewer
Определения ScriptConsoleConfigTab.c:24
class array< Class T > TStringArray
proto string Get(int index)
Gets n-th character from string.

Перекрестные ссылки string::Get(), m_ConfigHierarchyTextListbox, m_ModuleConfigViewer и TStringArray.

Используется в OnClick().