diff --git a/OtterGui b/OtterGui index 304f0d8a..988c8291 160000 --- a/OtterGui +++ b/OtterGui @@ -1 +1 @@ -Subproject commit 304f0d8a86c07c3a634e84a92dae356e17c10c0c +Subproject commit 988c8291bb09649712bf89334869c1f4f5ce356d diff --git a/Penumbra/Penumbra.cs b/Penumbra/Penumbra.cs index fdb59a91..fd7c2336 100644 --- a/Penumbra/Penumbra.cs +++ b/Penumbra/Penumbra.cs @@ -14,6 +14,7 @@ using ImGuiNET; using Lumina.Excel.GeneratedSheets; using OtterGui; using OtterGui.Classes; +using OtterGui.Widgets; using Penumbra.Api; using Penumbra.GameData.Enums; using Penumbra.Interop; @@ -64,6 +65,7 @@ public class Penumbra : IDalamudPlugin private readonly ConfigWindow _configWindow; private readonly LaunchButton _launchButton; private readonly WindowSystem _windowSystem; + private readonly Changelog _changelog; internal WebServer? WebServer; @@ -99,7 +101,7 @@ public class Penumbra : IDalamudPlugin HelpMessage = "/penumbra - toggle ui\n/penumbra reload - reload mod file lists & discover any new mods", } ); - SetupInterface( out _configWindow, out _launchButton, out _windowSystem ); + SetupInterface( out _configWindow, out _launchButton, out _windowSystem, out _changelog ); if( Config.EnableMods ) { @@ -152,14 +154,15 @@ public class Penumbra : IDalamudPlugin } } - private void SetupInterface( out ConfigWindow cfg, out LaunchButton btn, out WindowSystem system ) + private void SetupInterface( out ConfigWindow cfg, out LaunchButton btn, out WindowSystem system, out Changelog changelog ) { - cfg = new ConfigWindow( this ); - btn = new LaunchButton( _configWindow ); - system = new WindowSystem( Name ); + cfg = new ConfigWindow( this ); + btn = new LaunchButton( _configWindow ); + system = new WindowSystem( Name ); + changelog = ConfigWindow.CreateChangelog(); system.AddWindow( _configWindow ); system.AddWindow( cfg.ModEditPopup ); - system.AddWindow( ConfigWindow.CreateChangelog() ); + system.AddWindow( changelog ); Dalamud.PluginInterface.UiBuilder.OpenConfigUi += cfg.Toggle; } @@ -223,6 +226,9 @@ public class Penumbra : IDalamudPlugin public bool SetEnabled( bool enabled ) => enabled ? Enable() : Disable(); + public void ForceChangelogOpen() + => _changelog.ForceOpen = true; + private void SubscribeItemLinks() { Api.ChangedItemTooltip += it => diff --git a/Penumbra/UI/ConfigWindow.Changelog.cs b/Penumbra/UI/ConfigWindow.Changelog.cs index 654f020b..03d76923 100644 --- a/Penumbra/UI/ConfigWindow.Changelog.cs +++ b/Penumbra/UI/ConfigWindow.Changelog.cs @@ -16,17 +16,25 @@ public partial class ConfigWindow } ); Add5_7_0( ret ); + Add5_7_1( ret ); return ret; } + private static void Add5_7_1( Changelog log ) + => log.NextVersion( "Version 0.5.7.1" ) + .RegisterEntry( "Fixed the Changelog window not considering UI Scale correctly." ) + .RegisterEntry( "Reworked Changelog display slightly." ); + private static void Add5_7_0( Changelog log ) => log.NextVersion( "Version 0.5.7.0" ) .RegisterEntry( "Added a Changelog!" ) .RegisterEntry( "Files in the UI category will no longer be deduplicated for the moment." ) .RegisterHighlight( "If you experience UI-related crashes, please re-import your UI mods.", 1 ) .RegisterEntry( "This is a temporary fix against those not-yet fully understood crashes and may be reworked later.", 1 ) - .RegisterHighlight( "There is still a possibility of UI related mods crashing the game, we are still investigating - they behave very weirdly. If you continue to experience crashing, try disabling your UI mods.", 1 ) + .RegisterHighlight( + "There is still a possibility of UI related mods crashing the game, we are still investigating - they behave very weirdly. If you continue to experience crashing, try disabling your UI mods.", + 1 ) .RegisterEntry( "On import, Penumbra will now show files with extensions '.ttmp', '.ttmp2' and '.pmp'. You can still select showing generic archive files." ) .RegisterEntry( diff --git a/Penumbra/UI/ConfigWindow.SettingsTab.cs b/Penumbra/UI/ConfigWindow.SettingsTab.cs index 242e33b4..2cbd2c24 100644 --- a/Penumbra/UI/ConfigWindow.SettingsTab.cs +++ b/Penumbra/UI/ConfigWindow.SettingsTab.cs @@ -335,7 +335,7 @@ public partial class ConfigWindow + "Not directly affiliated and potentially, but not usually out of date." ); } - private static void DrawSupportButtons() + private void DrawSupportButtons() { var width = ImGui.CalcTextSize( SupportInfoButtonText ).X + ImGui.GetStyle().FramePadding.X * 2; var xPos = ImGui.GetWindowWidth() - width; @@ -363,7 +363,7 @@ public partial class ConfigWindow ImGui.SetCursorPos( new Vector2( xPos, 4 * ImGui.GetFrameHeightWithSpacing() ) ); if( ImGui.Button( "Show Changelogs", new Vector2( width, 0 ) ) ) { - Penumbra.Config.LastSeenVersion = 0; + _window._penumbra.ForceChangelogOpen(); } } }