private void DrawFileListTab() { if (!ImGui.BeginTabItem(LabelFileListTab)) { return; } using var raii = ImGuiRaii.DeferredEnd(ImGui.EndTabItem); ImGuiCustom.HoverTooltip(TooltipFilesTab); ImGui.SetNextItemWidth(-1); if (ImGui.BeginListBox(LabelFileListHeader, AutoFillSize)) { raii.Push(ImGui.EndListBox); UpdateFilenameList(); using var colorRaii = new ImGuiRaii.Color(); foreach (var(name, _, color, _) in _fullFilenameList !) { colorRaii.Push(ImGuiCol.Text, color); ImGui.Selectable(name.FullName); colorRaii.Pop(); } } else { _fullFilenameList = null; } }
private void DrawChangedItemsTab() { if (Mod.Data.ChangedItems.Count == 0 || !ImGui.BeginTabItem(LabelChangedItemsTab)) { return; } using var raii = ImGuiRaii.DeferredEnd(ImGui.EndTabItem); if (!ImGui.BeginListBox(LabelChangedItemsHeader, AutoFillSize)) { return; } raii.Push(ImGui.EndListBox); foreach (var(name, data) in Mod.Data.ChangedItems) { _base.DrawChangedItem(name, data); } }
private void DrawConflictTab() { if (!Mod.Cache.Conflicts.Any() || !ImGui.BeginTabItem(LabelConflictsTab)) { return; } using var raii = ImGuiRaii.DeferredEnd(ImGui.EndTabItem); ImGui.SetNextItemWidth(-1); if (!ImGui.BeginListBox(LabelConflictsHeader, AutoFillSize)) { return; } raii.Push(ImGui.EndListBox); using var indent = ImGuiRaii.PushIndent(0); foreach (var(mod, (files, manipulations)) in Mod.Cache.Conflicts) { if (ImGui.Selectable(mod.Data.Meta.Name)) { _selector.SelectModByDir(mod.Data.BasePath.Name); } ImGui.SameLine(); ImGui.Text($"(Priority {mod.Settings.Priority})"); indent.Push(15f); foreach (var file in files) { ImGui.Selectable(file); } foreach (var manip in manipulations) { ImGui.Text(manip.IdentifierString()); } indent.Pop(15f); } }