diff --git a/Dalamud/Interface/Internal/PluginCategoryManager.cs b/Dalamud/Interface/Internal/PluginCategoryManager.cs index 9515a55b5..28d0cddbd 100644 --- a/Dalamud/Interface/Internal/PluginCategoryManager.cs +++ b/Dalamud/Interface/Internal/PluginCategoryManager.cs @@ -28,7 +28,7 @@ internal class PluginCategoryManager 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, CategoryInfo.AppearCondition.ProfilesEnabled), + new(14, "special.profiles", () => Locs.Category_PluginProfiles), new(FirstTagBasedCategoryId + 0, "other", () => Locs.Category_Other), new(FirstTagBasedCategoryId + 1, "jobs", () => Locs.Category_Jobs), new(FirstTagBasedCategoryId + 2, "ui", () => Locs.Category_UI), @@ -353,11 +353,6 @@ internal class PluginCategoryManager /// Check if plugin testing is enabled. /// DoPluginTest, - - /// - /// Check if plugin profiles are enabled. - /// - ProfilesEnabled, } /// diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 036959233..dafc4cc3b 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -1218,10 +1218,6 @@ internal class PluginInstallerWindow : Window, IDisposable if (!Service.Get().DoPluginTest) continue; break; - case PluginCategoryManager.CategoryInfo.AppearCondition.ProfilesEnabled: - if (!Service.Get().ProfilesEnabled) - continue; - break; default: throw new ArgumentOutOfRangeException(); } diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs index 039877158..3f8f25f3e 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs @@ -50,6 +50,12 @@ internal class ProfileManagerWidget /// public void Draw() { + if (!Service.Get().ProfilesEnabled) + { + this.DrawChoice(); + return; + } + var tutorialTitle = Locs.TutorialTitle + "###collectionsTutorWindow"; var tutorialId = ImGui.GetID(tutorialTitle); this.DrawTutorial(tutorialTitle); @@ -76,6 +82,23 @@ internal class ProfileManagerWidget this.pickerSearch = string.Empty; } + private void DrawChoice() + { + ImGuiHelpers.ScaledDummy(60); + ImGuiHelpers.CenteredText(Locs.Choice1); + ImGuiHelpers.CenteredText(Locs.Choice2); + ImGuiHelpers.ScaledDummy(20); + + var buttonWidth = ImGui.GetWindowWidth() / 3; + ImGuiHelpers.CenterCursorFor((int)buttonWidth); + if (ImGui.Button(Locs.ChoiceConfirmation, new Vector2(buttonWidth, 40 * ImGuiHelpers.GlobalScale))) + { + var config = Service.Get(); + config.ProfilesEnabled = true; + config.QueueSave(); + } + } + private void DrawTutorial(string modalTitle) { var open = true; @@ -606,6 +629,15 @@ internal class ProfileManagerWidget public static string TutorialCommandsEnd => Loc.Localize("ProfileManagerTutorialCommandsEnd", "If you run multiple of these commands, they will be executed in order."); + public static string Choice1 => + Loc.Localize("ProfileManagerChoice1", "Plugin collections are a new feature that allow you to group plugins into collections which can be toggled and shared."); + + public static string Choice2 => + Loc.Localize("ProfileManagerChoice2", "They are experimental and may still contain bugs. Do you want to enable them now?"); + + public static string ChoiceConfirmation => + Loc.Localize("ProfileManagerChoiceConfirmation", "Yes, enable Plugin Collections"); + public static string NotInstalled(string name) => Loc.Localize("ProfileManagerNotInstalled", "{0} (Not Installed)").Format(name); } diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs index de9d1bae4..bd90d8509 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs @@ -48,6 +48,7 @@ public class SettingsTabExperimental : SettingsTab new ThirdRepoSettingsEntry(), + /* Disabling profiles after they've been enabled doesn't make much sense, at least not if the user has already created profiles. new GapSettingsEntry(5, true), new SettingsEntry( @@ -55,6 +56,7 @@ public class SettingsTabExperimental : SettingsTab Loc.Localize("DalamudSettingsEnableProfilesHint", "Enables plugin collections, which lets you create toggleable lists of plugins."), c => c.ProfilesEnabled, (v, c) => c.ProfilesEnabled = v), + */ }; public override string Title => Loc.Localize("DalamudSettingsExperimental", "Experimental");