From 49b0ad40b51845bbbde68a4133f2b15414cebade Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 3 Sep 2024 12:07:00 -0700 Subject: window size and UI enhancements - reduce extra spacing in windows - make config window resizeable - move unclaimed reward notification to make main window more compact - remove addon trigger chat message --- Malmstone/Addons/PvPMatchAddon.cs | 5 +---- Malmstone/Windows/ConfigWindow.cs | 9 ++++++--- Malmstone/Windows/MainWindow.cs | 11 ++++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs index bf5cc7d..7912665 100644 --- a/Malmstone/Addons/PvPMatchAddon.cs +++ b/Malmstone/Addons/PvPMatchAddon.cs @@ -39,7 +39,7 @@ namespace Malmstone.Addons public void DisableFrontlinePostMatch() { - Plugin.AddonLifeCycle.UnregisterListener(AddonEvent.PostSetup, "FrontlineRecord", OnFrontlineRecordTrigger); + Plugin.AddonLifeCycle.UnregisterListener(OnFrontlineRecordTrigger); } public void EnableRivalWingsPostMatch() @@ -55,7 +55,6 @@ namespace Malmstone.Addons // Runs on the result screen of the respective game mode private void OnCrystallineConflictRecordTrigger(AddonEvent eventType, AddonArgs addonInfo) { - Plugin.Chat.Print("Triggered MKS Record"); PvPSeriesInfo? seriesInfo = Plugin.PvPService.GetPvPSeriesInfo(); if (seriesInfo == null) return; if (Plugin.Configuration.ShowProgressionToastPostMatch) @@ -66,7 +65,6 @@ namespace Malmstone.Addons private void OnFrontlineRecordTrigger(AddonEvent eventType, AddonArgs addonInfo) { - Plugin.Chat.Print("Triggered Frontline Record"); PvPSeriesInfo? seriesInfo = Plugin.PvPService.GetPvPSeriesInfo(); if (seriesInfo == null) return; if (Plugin.Configuration.ShowProgressionToastPostMatch) @@ -77,7 +75,6 @@ namespace Malmstone.Addons private void OnRivalWingsRecordTrigger(AddonEvent eventType, AddonArgs addonInfo) { - Plugin.Chat.Print("Triggered Maneuvers Record"); PvPSeriesInfo? seriesInfo = Plugin.PvPService.GetPvPSeriesInfo(); if (seriesInfo == null) return; if (Plugin.Configuration.ShowProgressionToastPostMatch) diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs index 37b9490..9858b7e 100644 --- a/Malmstone/Windows/ConfigWindow.cs +++ b/Malmstone/Windows/ConfigWindow.cs @@ -13,9 +13,12 @@ public class ConfigWindow : Window, IDisposable public ConfigWindow(Plugin Plugin) : base("Malmstone Config") { - Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | - ImGuiWindowFlags.NoScrollWithMouse; - Size = new Vector2(350, 400); + Flags = ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse; + SizeConstraints = new WindowSizeConstraints + { + MinimumSize = new Vector2(350, 300), + MaximumSize = new Vector2(float.MaxValue, float.MaxValue) + }; Configuration = Plugin.Configuration; this.Plugin = Plugin; } diff --git a/Malmstone/Windows/MainWindow.cs b/Malmstone/Windows/MainWindow.cs index 6ead3a5..3cd53a4 100644 --- a/Malmstone/Windows/MainWindow.cs +++ b/Malmstone/Windows/MainWindow.cs @@ -24,7 +24,7 @@ namespace Malmstone.Windows { SizeConstraints = new WindowSizeConstraints { - MinimumSize = new Vector2(460, 530), + MinimumSize = new Vector2(460, 510), MaximumSize = new Vector2(float.MaxValue, float.MaxValue) }; @@ -110,13 +110,14 @@ namespace Malmstone.Windows ImGui.Separator(); ImGui.Spacing(); + if (ImGui.Button("Settings")) + Plugin.ToggleConfigUI(); + ImGui.SameLine(); if (pvpInfo.CurrentSeriesRank != pvpInfo.ClaimedSeriesRank) { - ImGui.SameLine(); - ImGui.Text("Don't forget to claim your rank rewards!"); + ImGui.Text("Don't forget to claim your Series Malmstone rewards!"); } - if (ImGui.Button("Settings")) - Plugin.ToggleConfigUI(); + } else { -- cgit v1.2.3