diff --git a/Dalamud/Interface/Internal/PluginCategoryManager.cs b/Dalamud/Interface/Internal/PluginCategoryManager.cs index a02dfffb9..62e7cd97d 100644 --- a/Dalamud/Interface/Internal/PluginCategoryManager.cs +++ b/Dalamud/Interface/Internal/PluginCategoryManager.cs @@ -16,47 +16,49 @@ internal class PluginCategoryManager /// /// First categoryId for tag based categories. /// - public const int FirstTagBasedCategoryId = 100; + private const int FirstTagBasedCategoryId = 100; private readonly CategoryInfo[] categoryList = - { - new(0, "special.all", () => Locs.Category_All), - new(1, "special.isTesting", () => Locs.Category_IsTesting, CategoryInfo.AppearCondition.DoPluginTest), - new(2, "special.availableForTesting", () => Locs.Category_AvailableForTesting, CategoryInfo.AppearCondition.DoPluginTest), - new(10, "special.devInstalled", () => Locs.Category_DevInstalled), - new(11, "special.devIconTester", () => Locs.Category_IconTester), - new(12, "special.dalamud", () => Locs.Category_Dalamud), - new(13, "special.plugins", () => Locs.Category_Plugins), - new(14, "special.profiles", () => Locs.Category_PluginProfiles), - new(15, "special.updateable", () => Locs.Category_UpdateablePlugins), - new(FirstTagBasedCategoryId + 0, "other", () => Locs.Category_Other), - new(FirstTagBasedCategoryId + 1, "jobs", () => Locs.Category_Jobs), - new(FirstTagBasedCategoryId + 2, "ui", () => Locs.Category_UI), - new(FirstTagBasedCategoryId + 3, "minigames", () => Locs.Category_MiniGames), - new(FirstTagBasedCategoryId + 4, "inventory", () => Locs.Category_Inventory), - new(FirstTagBasedCategoryId + 5, "sound", () => Locs.Category_Sound), - new(FirstTagBasedCategoryId + 6, "social", () => Locs.Category_Social), - new(FirstTagBasedCategoryId + 7, "utility", () => Locs.Category_Utility), + [ + new(CategoryKind.All, "special.all", () => Locs.Category_All), + new(CategoryKind.IsTesting, "special.isTesting", () => Locs.Category_IsTesting, CategoryInfo.AppearCondition.DoPluginTest), + new(CategoryKind.AvailableForTesting, "special.availableForTesting", () => Locs.Category_AvailableForTesting, CategoryInfo.AppearCondition.DoPluginTest), + new(CategoryKind.DevInstalled, "special.devInstalled", () => Locs.Category_DevInstalled), + new(CategoryKind.IconTester, "special.devIconTester", () => Locs.Category_IconTester), + new(CategoryKind.DalamudChangelogs, "special.dalamud", () => Locs.Category_Dalamud), + new(CategoryKind.PluginChangelogs, "special.plugins", () => Locs.Category_Plugins), + new(CategoryKind.PluginProfiles, "special.profiles", () => Locs.Category_PluginProfiles), + new(CategoryKind.UpdateablePlugins, "special.updateable", () => Locs.Category_UpdateablePlugins), + + // Tag-driven categories + new(CategoryKind.Other, "other", () => Locs.Category_Other), + new(CategoryKind.Jobs, "jobs", () => Locs.Category_Jobs), + new(CategoryKind.Ui, "ui", () => Locs.Category_UI), + new(CategoryKind.MiniGames, "minigames", () => Locs.Category_MiniGames), + new(CategoryKind.Inventory, "inventory", () => Locs.Category_Inventory), + new(CategoryKind.Sound, "sound", () => Locs.Category_Sound), + new(CategoryKind.Social, "social", () => Locs.Category_Social), + new(CategoryKind.Utility, "utility", () => Locs.Category_Utility) // order doesn't matter, all tag driven categories should have Id >= FirstTagBasedCategoryId - }; + ]; private GroupInfo[] groupList = - { - new(GroupKind.DevTools, () => Locs.Group_DevTools, 10, 11), - new(GroupKind.Installed, () => Locs.Group_Installed, 0, 1, 15, 14), - new(GroupKind.Available, () => Locs.Group_Available, 0), - new(GroupKind.Changelog, () => Locs.Group_Changelog, 0, 12, 13), + [ + new(GroupKind.DevTools, () => Locs.Group_DevTools, CategoryKind.DevInstalled, CategoryKind.IconTester), + new(GroupKind.Installed, () => Locs.Group_Installed, CategoryKind.All, CategoryKind.IsTesting, CategoryKind.UpdateablePlugins, CategoryKind.PluginProfiles), + new(GroupKind.Available, () => Locs.Group_Available, CategoryKind.All), + new(GroupKind.Changelog, () => Locs.Group_Changelog, CategoryKind.All, CategoryKind.DalamudChangelogs, CategoryKind.PluginChangelogs) // order important, used for drawing, keep in sync with defaults for currentGroupIdx - }; + ]; private int currentGroupIdx = 2; - private int currentCategoryIdx = 0; + private CategoryKind currentCategoryKind = CategoryKind.All; private bool isContentDirty; - private Dictionary mapPluginCategories = new(); - private List highlightedCategoryIds = new(); + private Dictionary mapPluginCategories = new(); + private List highlightedCategoryKinds = new(); /// /// Type of category group. @@ -84,6 +86,97 @@ internal class PluginCategoryManager Changelog, } + /// + /// Type of category. + /// + public enum CategoryKind + { + /// + /// All plugins. + /// + All = 0, + + /// + /// Plugins currently being tested. + /// + IsTesting = 1, + + /// + /// Plugins available for testing. + /// + AvailableForTesting = 2, + + /// + /// Installed dev plugins. + /// + DevInstalled = 10, + + /// + /// Icon tester. + /// + IconTester = 11, + + /// + /// Changelogs for Dalamud. + /// + DalamudChangelogs = 12, + + /// + /// Changelogs for plugins. + /// + PluginChangelogs = 13, + + /// + /// Change plugin profiles. + /// + PluginProfiles = 14, + + /// + /// Updateable plugins. + /// + UpdateablePlugins = 15, + + /// + /// Plugins tagged as "other". + /// + Other = FirstTagBasedCategoryId + 0, + + /// + /// Plugins tagged as "jobs". + /// + Jobs = FirstTagBasedCategoryId + 1, + + /// + /// Plugins tagged as "ui". + /// + Ui = FirstTagBasedCategoryId + 2, + + /// + /// Plugins tagged as "minigames". + /// + MiniGames = FirstTagBasedCategoryId + 3, + + /// + /// Plugins tagged as "inventory". + /// + Inventory = FirstTagBasedCategoryId + 4, + + /// + /// Plugins tagged as "sound". + /// + Sound = FirstTagBasedCategoryId + 5, + + /// + /// Plugins tagged as "social". + /// + Social = FirstTagBasedCategoryId + 6, + + /// + /// Plugins tagged as "utility". + /// + Utility = FirstTagBasedCategoryId + 7, + } + /// /// Gets the list of all known categories. /// @@ -93,39 +186,50 @@ internal class PluginCategoryManager /// Gets the list of all known UI groups. /// public GroupInfo[] GroupList => this.groupList; - + /// - /// Gets or sets current group. + /// Gets or sets the current group kind. /// - public int CurrentGroupIdx + public GroupKind CurrentGroupKind { - get => this.currentGroupIdx; + get => this.groupList[this.currentGroupIdx].GroupKind; set { - if (this.currentGroupIdx != value) + var newIdx = Array.FindIndex(this.groupList, x => x.GroupKind == value); + if (newIdx >= 0) { - this.currentGroupIdx = value; - this.currentCategoryIdx = 0; + this.currentGroupIdx = newIdx; + this.currentCategoryKind = this.CurrentGroup.Categories.First(); this.isContentDirty = true; } } } - + /// - /// Gets or sets current category, index in current Group.Categories array. + /// Gets information about currently selected group. /// - public int CurrentCategoryIdx + public GroupInfo CurrentGroup => this.groupList[this.currentGroupIdx]; + + /// + /// Gets or sets the current category kind. + /// + public CategoryKind CurrentCategoryKind { - get => this.currentCategoryIdx; + get => this.currentCategoryKind; set { - if (this.currentCategoryIdx != value) + if (this.currentCategoryKind != value) { - this.currentCategoryIdx = value; + this.currentCategoryKind = value; this.isContentDirty = true; } } } + + /// + /// Gets information about currently selected category. + /// + public CategoryInfo CurrentCategory => this.categoryList.First(x => x.CategoryKind == this.currentCategoryKind); /// /// Gets a value indicating whether current group + category selection changed recently. @@ -134,13 +238,12 @@ internal class PluginCategoryManager public bool IsContentDirty => this.isContentDirty; /// - /// Gets a value indicating whether and are valid. + /// Gets a value indicating whether and are valid. /// public bool IsSelectionValid => (this.currentGroupIdx >= 0) && (this.currentGroupIdx < this.groupList.Length) && - (this.currentCategoryIdx >= 0) && - (this.currentCategoryIdx < this.groupList[this.currentGroupIdx].Categories.Count); + this.groupList[this.currentGroupIdx].Categories.Contains(this.currentCategoryKind); /// /// Rebuild available categories based on currently available plugins. @@ -152,10 +255,10 @@ internal class PluginCategoryManager this.mapPluginCategories.Clear(); var groupAvail = Array.Find(this.groupList, x => x.GroupKind == GroupKind.Available); - var prevCategoryIds = new List(); + var prevCategoryIds = new List(); prevCategoryIds.AddRange(groupAvail.Categories); - var categoryList = new List(); + var categoryList = new List(); var allCategoryIndices = new List(); foreach (var manifest in availablePlugins) @@ -171,10 +274,10 @@ internal class PluginCategoryManager var matchIdx = Array.FindIndex(this.CategoryList, x => x.Tag.Equals(tag, StringComparison.InvariantCultureIgnoreCase)); if (matchIdx >= 0) { - var categoryId = this.CategoryList[matchIdx].CategoryId; - if (categoryId >= FirstTagBasedCategoryId) + var categoryKind = this.CategoryList[matchIdx].CategoryKind; + if ((int)categoryKind >= FirstTagBasedCategoryId) { - categoryList.Add(categoryId); + categoryList.Add(categoryKind); if (!allCategoryIndices.Contains(matchIdx)) { @@ -186,7 +289,7 @@ internal class PluginCategoryManager } if (PluginManager.HasTestingVersion(manifest) || manifest.IsTestingExclusive) - categoryList.Add(2); + categoryList.Add(CategoryKind.AvailableForTesting); // always add, even if empty this.mapPluginCategories.Add(manifest, categoryList.ToArray()); @@ -204,11 +307,11 @@ internal class PluginCategoryManager foreach (var categoryIdx in allCategoryIndices) { - groupAvail.Categories.Add(this.CategoryList[categoryIdx].CategoryId); + groupAvail.Categories.Add(this.CategoryList[categoryIdx].CategoryKind); } // compare with prev state and mark as dirty if needed - var noCategoryChanges = Enumerable.SequenceEqual(prevCategoryIds, groupAvail.Categories); + var noCategoryChanges = prevCategoryIds.SequenceEqual(groupAvail.Categories); if (!noCategoryChanges) { this.isContentDirty = true; @@ -229,20 +332,20 @@ internal class PluginCategoryManager { var groupInfo = this.groupList[this.currentGroupIdx]; - var includeAll = (this.currentCategoryIdx == 0) || (groupInfo.GroupKind != GroupKind.Available); + var includeAll = (this.currentCategoryKind == CategoryKind.All) || (groupInfo.GroupKind != GroupKind.Available); if (includeAll) { result.AddRange(plugins); } else { - var selectedCategoryInfo = Array.Find(this.categoryList, x => x.CategoryId == groupInfo.Categories[this.currentCategoryIdx]); + var selectedCategoryInfo = Array.Find(this.categoryList, x => x.CategoryKind == this.currentCategoryKind); foreach (var plugin in plugins) { if (this.mapPluginCategories.TryGetValue(plugin, out var pluginCategoryIds)) { - var matchIdx = Array.IndexOf(pluginCategoryIds, selectedCategoryInfo.CategoryId); + var matchIdx = Array.IndexOf(pluginCategoryIds, selectedCategoryInfo.CategoryKind); if (matchIdx >= 0) { result.Add(plugin); @@ -270,20 +373,17 @@ internal class PluginCategoryManager /// List of plugins whose categories should be highlighted. public void SetCategoryHighlightsForPlugins(IEnumerable plugins) { - this.highlightedCategoryIds.Clear(); + this.highlightedCategoryKinds.Clear(); - if (plugins != null) + foreach (var entry in plugins) { - foreach (var entry in plugins) + if (this.mapPluginCategories.TryGetValue(entry, out var pluginCategories)) { - if (this.mapPluginCategories.TryGetValue(entry, out var pluginCategories)) + foreach (var categoryKind in pluginCategories) { - foreach (var categoryId in pluginCategories) + if (!this.highlightedCategoryKinds.Contains(categoryKind)) { - if (!this.highlightedCategoryIds.Contains(categoryId)) - { - this.highlightedCategoryIds.Add(categoryId); - } + this.highlightedCategoryKinds.Add(categoryKind); } } } @@ -293,9 +393,9 @@ internal class PluginCategoryManager /// /// Checks if category should be highlighted. /// - /// CategoryId to check. + /// CategoryKind to check. /// true if highlight is needed. - public bool IsCategoryHighlighted(int categoryId) => this.highlightedCategoryIds.Contains(categoryId); + public bool IsCategoryHighlighted(CategoryKind categoryKind) => this.highlightedCategoryKinds.Contains(categoryKind); private IEnumerable GetCategoryTagsForManifest(PluginManifest pluginManifest) { @@ -315,7 +415,7 @@ internal class PluginCategoryManager /// /// Unique Id number of category, tag match based should be greater of equal . /// - public int CategoryId; + public CategoryKind CategoryKind; /// /// Tag from plugin manifest to match. @@ -327,13 +427,13 @@ internal class PluginCategoryManager /// /// Initializes a new instance of the struct. /// - /// Unique id of category. + /// Kind of the category. /// Tag to match. /// Function returning localized name of category. /// Condition to be checked when deciding whether this category should be shown. - public CategoryInfo(int categoryId, string tag, Func nameFunc, AppearCondition condition = AppearCondition.None) + public CategoryInfo(CategoryKind categoryKind, string tag, Func nameFunc, AppearCondition condition = AppearCondition.None) { - this.CategoryId = categoryId; + this.CategoryKind = categoryKind; this.Tag = tag; this.nameFunc = nameFunc; this.Condition = condition; @@ -379,7 +479,7 @@ internal class PluginCategoryManager /// /// List of categories in container. /// - public List Categories; + public List Categories; private Func nameFunc; @@ -389,7 +489,7 @@ internal class PluginCategoryManager /// Type of group. /// Function returning localized name of category. /// List of category Ids to hardcode. - public GroupInfo(GroupKind groupKind, Func nameFunc, params int[] categories) + public GroupInfo(GroupKind groupKind, Func nameFunc, params CategoryKind[] categories) { this.GroupKind = groupKind; this.nameFunc = nameFunc; diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 046557e87..1c64e9baa 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -428,27 +428,27 @@ internal class PluginInstallerWindow : Window, IDisposable { case PluginInstallerOpenKind.AllPlugins: // Plugins group - this.categoryManager.CurrentGroupIdx = 2; + this.categoryManager.CurrentGroupKind = PluginCategoryManager.GroupKind.Available; // All category - this.categoryManager.CurrentCategoryIdx = 0; + this.categoryManager.CurrentCategoryKind = PluginCategoryManager.CategoryKind.All; break; case PluginInstallerOpenKind.InstalledPlugins: // Installed group - this.categoryManager.CurrentGroupIdx = 1; + this.categoryManager.CurrentGroupKind = PluginCategoryManager.GroupKind.Installed; // All category - this.categoryManager.CurrentCategoryIdx = 0; + this.categoryManager.CurrentCategoryKind = PluginCategoryManager.CategoryKind.All; break; case PluginInstallerOpenKind.UpdateablePlugins: // Installed group - this.categoryManager.CurrentGroupIdx = 1; + this.categoryManager.CurrentGroupKind = PluginCategoryManager.GroupKind.Installed; // Updateable category - this.categoryManager.CurrentCategoryIdx = 15; + this.categoryManager.CurrentCategoryKind = PluginCategoryManager.CategoryKind.UpdateablePlugins; break; case PluginInstallerOpenKind.Changelogs: // Changelog group - this.categoryManager.CurrentGroupIdx = 3; + this.categoryManager.CurrentGroupKind = PluginCategoryManager.GroupKind.Changelog; // Plugins category - this.categoryManager.CurrentCategoryIdx = 2; + this.categoryManager.CurrentCategoryKind = PluginCategoryManager.CategoryKind.All; break; default: throw new ArgumentOutOfRangeException(nameof(kind), kind, null); @@ -611,7 +611,8 @@ internal class PluginInstallerWindow : Window, IDisposable ImGui.SetCursorPosX(windowSize.X - sortSelectWidth - (style.ItemSpacing.X * 2) - searchInputWidth - searchClearButtonWidth); var isProfileManager = - this.categoryManager.CurrentGroupIdx == 1 && this.categoryManager.CurrentCategoryIdx == 2; + this.categoryManager.CurrentGroupKind == PluginCategoryManager.GroupKind.Installed && + this.categoryManager.CurrentCategoryKind == PluginCategoryManager.CategoryKind.PluginProfiles; // Disable search if profile editor using (ImRaii.Disabled(isProfileManager)) @@ -641,7 +642,7 @@ internal class PluginInstallerWindow : Window, IDisposable } // Disable sort if changelogs or profile editor - using (ImRaii.Disabled(this.categoryManager.CurrentGroupIdx == 3 || isProfileManager)) + using (ImRaii.Disabled(this.categoryManager.CurrentGroupKind == PluginCategoryManager.GroupKind.Changelog || isProfileManager)) { ImGui.SameLine(); ImGui.SetCursorPosY(downShift); @@ -781,9 +782,7 @@ internal class PluginInstallerWindow : Window, IDisposable Service.Get().PrintUpdatedPlugins(this.updatedPlugins, Locs.PluginUpdateHeader_Chatbox); notifications.AddNotification(Locs.Notifications_UpdatesInstalled(this.updatePluginCount), Locs.Notifications_UpdatesInstalledTitle, NotificationType.Success); - var installedGroupIdx = this.categoryManager.GroupList.TakeWhile( - x => x.GroupKind != PluginCategoryManager.GroupKind.Installed).Count(); - this.categoryManager.CurrentGroupIdx = installedGroupIdx; + this.categoryManager.CurrentGroupKind = PluginCategoryManager.GroupKind.Installed; } else if (this.updatePluginCount == 0) { @@ -1373,29 +1372,29 @@ internal class PluginInstallerWindow : Window, IDisposable } } - for (var groupIdx = 0; groupIdx < this.categoryManager.GroupList.Length; groupIdx++) + foreach (var groupInfo in this.categoryManager.GroupList) { - var groupInfo = this.categoryManager.GroupList[groupIdx]; var canShowGroup = (groupInfo.GroupKind != PluginCategoryManager.GroupKind.DevTools) || this.hasDevPlugins; if (!canShowGroup) { continue; } - ImGui.SetNextItemOpen(groupIdx == this.categoryManager.CurrentGroupIdx); - if (ImGui.CollapsingHeader(groupInfo.Name, groupIdx == this.categoryManager.CurrentGroupIdx ? ImGuiTreeNodeFlags.OpenOnDoubleClick : ImGuiTreeNodeFlags.None)) + var isCurrent = groupInfo.GroupKind == this.categoryManager.CurrentGroupKind; + ImGui.SetNextItemOpen(isCurrent); + if (ImGui.CollapsingHeader(groupInfo.Name, isCurrent ? ImGuiTreeNodeFlags.OpenOnDoubleClick : ImGuiTreeNodeFlags.None)) { - if (this.categoryManager.CurrentGroupIdx != groupIdx) + if (!isCurrent) { - this.categoryManager.CurrentGroupIdx = groupIdx; + this.categoryManager.CurrentGroupKind = groupInfo.GroupKind; } ImGui.Indent(); var categoryItemSize = new Vector2(ImGui.GetContentRegionAvail().X - (5 * ImGuiHelpers.GlobalScale), ImGui.GetTextLineHeight()); - for (var categoryIdx = 0; categoryIdx < groupInfo.Categories.Count; categoryIdx++) + foreach (var categoryKind in groupInfo.Categories) { - var categoryInfo = Array.Find(this.categoryManager.CategoryList, x => x.CategoryId == groupInfo.Categories[categoryIdx]); - + var categoryInfo = this.categoryManager.CategoryList.First(x => x.CategoryKind == categoryKind); + switch (categoryInfo.Condition) { case PluginCategoryManager.CategoryInfo.AppearCondition.None: @@ -1409,15 +1408,15 @@ internal class PluginInstallerWindow : Window, IDisposable throw new ArgumentOutOfRangeException(); } - var hasSearchHighlight = this.categoryManager.IsCategoryHighlighted(categoryInfo.CategoryId); + var hasSearchHighlight = this.categoryManager.IsCategoryHighlighted(categoryInfo.CategoryKind); if (hasSearchHighlight) { ImGui.PushStyleColor(ImGuiCol.Text, colorSearchHighlight); } - if (ImGui.Selectable(categoryInfo.Name, this.categoryManager.CurrentCategoryIdx == categoryIdx, ImGuiSelectableFlags.None, categoryItemSize)) + if (ImGui.Selectable(categoryInfo.Name, this.categoryManager.CurrentCategoryKind == categoryKind, ImGuiSelectableFlags.None, categoryItemSize)) { - this.categoryManager.CurrentCategoryIdx = categoryIdx; + this.categoryManager.CurrentCategoryKind = categoryKind; } if (hasSearchHighlight) @@ -1427,11 +1426,7 @@ internal class PluginInstallerWindow : Window, IDisposable } ImGui.Unindent(); - - if (groupIdx != this.categoryManager.GroupList.Length - 1) - { - ImGuiHelpers.ScaledDummy(5); - } + ImGuiHelpers.ScaledDummy(5); } } } @@ -1467,7 +1462,7 @@ internal class PluginInstallerWindow : Window, IDisposable ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, ImGuiHelpers.ScaledVector2(1, 3)); - var groupInfo = this.categoryManager.GroupList[this.categoryManager.CurrentGroupIdx]; + var groupInfo = this.categoryManager.CurrentGroup; if (this.categoryManager.IsContentDirty) { // reset opened list of collapsibles when switching between categories @@ -1484,13 +1479,13 @@ internal class PluginInstallerWindow : Window, IDisposable { case PluginCategoryManager.GroupKind.DevTools: // this one is never sorted and remains in hardcoded order from group ctor - switch (this.categoryManager.CurrentCategoryIdx) + switch (this.categoryManager.CurrentCategoryKind) { - case 0: + case PluginCategoryManager.CategoryKind.DevInstalled: this.DrawInstalledPluginList(InstalledPluginListFilter.Dev); break; - case 1: + case PluginCategoryManager.CategoryKind.IconTester: this.DrawImageTester(); break; @@ -1501,21 +1496,21 @@ internal class PluginInstallerWindow : Window, IDisposable break; case PluginCategoryManager.GroupKind.Installed: - switch (this.categoryManager.CurrentCategoryIdx) + switch (this.categoryManager.CurrentCategoryKind) { - case 0: + case PluginCategoryManager.CategoryKind.All: this.DrawInstalledPluginList(InstalledPluginListFilter.None); break; - case 1: + case PluginCategoryManager.CategoryKind.IsTesting: this.DrawInstalledPluginList(InstalledPluginListFilter.Testing); break; - case 2: + case PluginCategoryManager.CategoryKind.UpdateablePlugins: this.DrawInstalledPluginList(InstalledPluginListFilter.Updateable); break; - case 3: + case PluginCategoryManager.CategoryKind.PluginProfiles: this.profileManagerWidget.Draw(); break; @@ -1526,19 +1521,23 @@ internal class PluginInstallerWindow : Window, IDisposable break; case PluginCategoryManager.GroupKind.Changelog: - switch (this.categoryManager.CurrentCategoryIdx) + switch (this.categoryManager.CurrentCategoryKind) { - case 0: + case PluginCategoryManager.CategoryKind.All: this.DrawChangelogList(true, true); break; - case 1: + case PluginCategoryManager.CategoryKind.DalamudChangelogs: this.DrawChangelogList(true, false); break; - case 2: + case PluginCategoryManager.CategoryKind.PluginChangelogs: this.DrawChangelogList(false, true); break; + + default: + ImGui.TextUnformatted("You found a quiet category. Please don't wake it up."); + break; } break;