diff --git a/Dalamud/Game/Internal/DalamudAtkTweaks.cs b/Dalamud/Game/Internal/DalamudAtkTweaks.cs index 9dc27e545..0013dca4d 100644 --- a/Dalamud/Game/Internal/DalamudAtkTweaks.cs +++ b/Dalamud/Game/Internal/DalamudAtkTweaks.cs @@ -222,10 +222,10 @@ internal sealed unsafe partial class DalamudAtkTweaks : IServiceType switch (commandId) { case 69420: - dalamudInterface?.TogglePluginInstallerWindowTo(this.configuration.PluginInstallerOpen); + dalamudInterface?.OpenPluginInstaller(); break; case 69421: - dalamudInterface?.ToggleSettingsWindow(); + dalamudInterface?.OpenSettings(); break; default: this.hookUiModuleRequestMainCommand.Original(thisPtr, commandId); diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index 189baab4d..a6c4e243c 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -48,7 +48,9 @@ internal class DalamudInterface : IDisposable, IServiceType private const float CreditsDarkeningMaxAlpha = 0.8f; private static readonly ModuleLog Log = new("DUI"); - + + private readonly DalamudConfiguration configuration; + private readonly ChangelogWindow changelogWindow; private readonly ColorDemoWindow colorDemoWindow; private readonly ComponentDemoWindow componentDemoWindow; @@ -92,6 +94,8 @@ internal class DalamudInterface : IDisposable, IServiceType PluginImageCache pluginImageCache, Branding branding) { + this.configuration = configuration; + var interfaceManager = interfaceManagerWithScene.Manager; this.WindowSystem = new WindowSystem("DalamudCore"); @@ -135,7 +139,7 @@ internal class DalamudInterface : IDisposable, IServiceType interfaceManager.Draw += this.OnDraw; var tsm = Service.Get(); - tsm.AddEntryCore(Loc.Localize("TSMDalamudPlugins", "Plugin Installer"), branding.LogoSmall, this.OpenPluginInstaller); + tsm.AddEntryCore(Loc.Localize("TSMDalamudPlugins", "Plugin Installer"), branding.LogoSmall, () => this.OpenPluginInstaller()); tsm.AddEntryCore(Loc.Localize("TSMDalamudSettings", "Dalamud Settings"), branding.LogoSmall, this.OpenSettings); if (!configuration.DalamudBetaKind.IsNullOrEmpty()) @@ -241,13 +245,14 @@ internal class DalamudInterface : IDisposable, IServiceType this.pluginStatWindow.IsOpen = true; this.pluginStatWindow.BringToFront(); } - + /// - /// Opens the . + /// Opens the on the plugin installed. /// + /// The page of the installer to open. public void OpenPluginInstaller() { - this.pluginWindow.IsOpen = true; + this.pluginWindow.OpenTo(this.configuration.PluginInstallerOpen); this.pluginWindow.BringToFront(); } diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 9ecc0c056..a66d132c7 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -411,13 +411,13 @@ internal class PluginInstallerWindow : Window, IDisposable { case PluginInstallerOpenKind.AllPlugins: // Plugins group - this.categoryManager.CurrentGroupIdx = 0; + this.categoryManager.CurrentGroupIdx = 2; // All category this.categoryManager.CurrentCategoryIdx = 0; break; case PluginInstallerOpenKind.InstalledPlugins: // Installed group - this.categoryManager.CurrentGroupIdx = 2; + this.categoryManager.CurrentGroupIdx = 1; // All category this.categoryManager.CurrentCategoryIdx = 0; break;