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

◆ CollapseHierarchy()

void ScriptConsoleConfigTab::CollapseHierarchy ( int row)
inlineprotected

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

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

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

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