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

◆ CollapseHierarchy()

void ScriptConsoleConfigTab::CollapseHierarchy ( int row)
inlineprotected

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

423 {
424 if (row <= -1 && row >= m_ConfigHierarchyTextListbox.GetNumItems())
425 {
426 return;
427 }
428
429 ConfigParamsEx config_params;
430 ConfigParamsEx config_params_next;
431 m_ConfigHierarchyTextListbox.GetItemData(row, 0, config_params);
432 m_ConfigHierarchyTextListbox.GetItemData(row + 1, 0, config_params_next);
433
434 if (!config_params || !config_params_next)
435 return;
436 int deep = config_params.param5;
437 int deep_next = config_params_next.param5;
438 int max_count = m_ConfigHierarchyTextListbox.GetNumItems();
439 int remove_lines_count = 0;
440 // Print(max_count);
441 for (int i = row + 1; i < max_count; i++)
442 {
443 if (deep < deep_next && i <= max_count)
444 {
445 remove_lines_count = remove_lines_count + 1;
446 m_ConfigHierarchyTextListbox.GetItemData(i, 0, config_params_next);
447 deep_next = config_params_next.param5;
448 }
449 }
450
451 // remove remove_lines_count lines from row
452 // remove_lines_count = remove_lines_count - 1;
453 for (i = 1; i < remove_lines_count; i++)
454 {
455 int x = row + 1;
456 if (x < max_count)
457 {
459 }
460 }
461
462 string offset = "";
463 for (i = 0; i < deep; i++)
464 {
465 offset = offset + " ";
466 }
467 m_ConfigHierarchyTextListbox.SetItem(row, offset + "+ " + config_params.param2, new ConfigParamsEx(false, config_params.param2, 0, config_params.param4, deep,""), 0);
468 /* //not sure why this is here, but it's causing issues when collapsing items in config viewer, disabling for now
469 if (deep == 0)
470 {
471 ClearHierarchy();
472 }
473 */
474 }
Icon x
Param6< bool, string, int, string, int, string > ConfigParamsEx
Определения ScriptConsoleConfigTab.c:2
TextListboxWidget m_ConfigHierarchyTextListbox
Определения ScriptConsoleConfigTab.c:16

Перекрестные ссылки m_ConfigHierarchyTextListbox и x.

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