diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-09-03 17:10:41 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-09-03 17:31:28 -0700 |
| commit | d5be3a7bc1c4176a9348f81f9677f14ed0b49676 (patch) | |
| tree | 2a0431a7a4d87139061748fbae51f89f9544d24f /Malmstone/Windows/ConfigWindow.cs | |
| parent | 48122c50492b8c4d8acecee903868b226cc30293 (diff) | |
| parent | 04b359033329d4bcd21b574e601601ffff135ff5 (diff) | |
Merge branch 'postmatch'
Add post match toast and chat messages
Diffstat (limited to 'Malmstone/Windows/ConfigWindow.cs')
| -rw-r--r-- | Malmstone/Windows/ConfigWindow.cs | 102 |
1 files changed, 93 insertions, 9 deletions
diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs index 2c2895b..e6376b3 100644 --- a/Malmstone/Windows/ConfigWindow.cs +++ b/Malmstone/Windows/ConfigWindow.cs @@ -8,14 +8,19 @@ namespace Malmstone.Windows; public class ConfigWindow : Window, IDisposable { private Configuration Configuration; + private Plugin Plugin; + private string[] ToastOptions = {"Normal", "Quest", "Error"}; - public ConfigWindow(Plugin plugin) : base("Malmstone Config") + public ConfigWindow(Plugin Plugin) : base("Malmstone Config") { - Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | - ImGuiWindowFlags.NoScrollWithMouse; - - Size = new Vector2(232, 150); - Configuration = plugin.Configuration; + 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; } public void Dispose() { } @@ -33,14 +38,93 @@ public class ConfigWindow : Window, IDisposable if (savedTargetSeriesRank < 1) savedTargetSeriesRank = 1; if (savedTargetSeriesRank > 107397) savedTargetSeriesRank = 107397; Configuration.DefaultTargetRankProperty = savedTargetSeriesRank; + Configuration.Save(); } - ImGui.Spacing(); + ImGui.Separator(); + + ImGui.Text("Show EXP progression after PVP matches"); + ImGui.SameLine(); + var showProgressionToastPostMatch = Configuration.ShowProgressionToastPostMatch; + if (ImGui.Checkbox("##ShowProgressionToastPostMatch", ref showProgressionToastPostMatch)) + { + Configuration.ShowProgressionToastPostMatch = showProgressionToastPostMatch; + if (showProgressionToastPostMatch) + Plugin.PvPAddon.EnablePostMatchProgressionToast(); + else + Plugin.PvPAddon.DisablePostMatchProgressionToast(); + Configuration.Save(); + } + + ImGui.Text("Notification Type"); + int selectedPostMatchToastType = Configuration.PostmatchProgressionToastType; + if (ImGui.Combo("##MatchOptions", ref selectedPostMatchToastType, ToastOptions, ToastOptions.Length)) + { + switch (selectedPostMatchToastType) + { + case 0: + Plugin.ToastGui.ShowNormal("[Malmstone Calculator] Normal Toast Selected"); + break; + case 1: + Plugin.ToastGui.ShowQuest("[Malmstone Calculator] Quest Toast Selected"); + break; + case 2: + Plugin.ToastGui.ShowError("[Malmstone Calculator] Error Toast Selected"); + break; + } + Configuration.PostmatchProgressionToastType = selectedPostMatchToastType; + Configuration.Save(); + } + + ImGui.Separator(); + ImGui.Text("Show matches until next rank in chat after"); + - if (ImGui.Button("Save and Close")) + var showCCMatchesRemainingPostGame = Configuration.ShowProgressionChatPostCC; + if (ImGui.Checkbox("##ShowCCMatchesRemainingPostGame", ref showCCMatchesRemainingPostGame)) { + Configuration.ShowProgressionChatPostCC = showCCMatchesRemainingPostGame; + if (showCCMatchesRemainingPostGame) + Plugin.PvPAddon.EnableCrystallineConflictPostMatch(); + else + Plugin.PvPAddon.DisableCrystallineConflictPostMatch(); Configuration.Save(); - IsOpen = false; } + ImGui.SameLine(); + ImGui.Text("Crystalline Conflict"); + + + var showFLMatchesRemainingPostGame = Configuration.ShowProgressionChatPostFL; + if (ImGui.Checkbox("##ShowFLMatchesRemainingPostGame", ref showFLMatchesRemainingPostGame)) + { + Configuration.ShowProgressionChatPostFL = showFLMatchesRemainingPostGame; + if (showFLMatchesRemainingPostGame) + Plugin.PvPAddon.EnableFrontlinePostMatch(); + else + Plugin.PvPAddon.DisableFrontlinePostMatch(); + Configuration.Save(); + } + ImGui.SameLine(); + ImGui.Text("Frontlines"); + + + var showRWMatchesRemainingPostGame = Configuration.ShowProgressionChatPostRW; + if (ImGui.Checkbox("##ShowRWMatchesRemainingPostGame", ref showRWMatchesRemainingPostGame)) + { + Configuration.ShowProgressionChatPostRW = showRWMatchesRemainingPostGame; + if (showRWMatchesRemainingPostGame) + Plugin.PvPAddon.EnableRivalWingsPostMatch(); + else + Plugin.PvPAddon.DisableRivalWingsPostMatch(); + Configuration.Save(); + } + ImGui.SameLine(); + ImGui.Text("Rival Wings"); + + + ImGui.Separator(); + ImGui.Spacing(); + ImGui.Text("Changes saved automatically"); + } } |
