aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2024-09-15 20:50:12 -0700
committerPinapelz <yukais@pinapelz.com>2024-09-15 20:50:12 -0700
commitf49522524dd8235869086cf8ed88dc49f50ef5f1 (patch)
tree33eb570f27ac435535fd20510316a91660a0e893
parent397ae9c0ba4f7c8540f3f7840fc87c998f91d77c (diff)
rework config window to use tabs
-rw-r--r--Malmstone/Windows/ConfigWindow.cs429
1 files changed, 234 insertions, 195 deletions
diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs
index 66fcbb2..2d90d42 100644
--- a/Malmstone/Windows/ConfigWindow.cs
+++ b/Malmstone/Windows/ConfigWindow.cs
@@ -31,225 +31,264 @@ public class ConfigWindow : Window, IDisposable
public override void Draw()
{
- ImGui.Text("Default Target Series Level");
- var savedTargetSeriesRank = Configuration.DefaultTargetRankProperty;
- if (ImGui.InputInt("##SavedTargetSeriesRank", ref savedTargetSeriesRank, 1))
- {
- if (savedTargetSeriesRank < 1) savedTargetSeriesRank = 1;
- if (savedTargetSeriesRank > 107397) savedTargetSeriesRank = 107397;
- Configuration.DefaultTargetRankProperty = savedTargetSeriesRank;
- Configuration.Save();
- }
-
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Calculator will auto-populate with this number after initializing" +
- "\nAlso controls the notification override settings below");
- ImGui.EndTooltip();
- }
+ ImGui.BeginTabBar("Settings");
- var skipProgressionToastAfterGoal = Configuration.SkipProgressionToastAfterGoal;
- if(ImGui.Checkbox("###SkipProgressionToastAfterGoal", ref skipProgressionToastAfterGoal)){
- Configuration.SkipProgressionToastAfterGoal = skipProgressionToastAfterGoal;
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
+ // PVP Match Tab
+ if (ImGui.BeginTabItem("PVP Match"))
{
- ImGui.BeginTooltip();
- ImGui.Text("Automatically stops showing EXP progression notification after reaching the Default Target Series Level" +
- "\nOverrides other EXP notification settings");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Skip EXP progression notifications after default level is achieved");
+ ImGui.Text("Default Target Series Level");
+ var savedTargetSeriesRank = Configuration.DefaultTargetRankProperty;
+ if (ImGui.InputInt("##SavedTargetSeriesRank", ref savedTargetSeriesRank, 1))
+ {
+ if (savedTargetSeriesRank < 1) savedTargetSeriesRank = 1;
+ if (savedTargetSeriesRank > 107397) savedTargetSeriesRank = 107397;
+ Configuration.DefaultTargetRankProperty = savedTargetSeriesRank;
+ Configuration.Save();
+ }
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Calculator will auto-populate with this number after initializing" +
+ "\nAlso controls the notification override settings below");
+ ImGui.EndTooltip();
+ }
-
- var skipProgressionChatAfterGoal = Configuration.SkipProgressionChatAfterGoal;
- if(ImGui.Checkbox("###SkipProgressionChatAfterGoal", ref skipProgressionChatAfterGoal)){
- Configuration.SkipProgressionChatAfterGoal = skipProgressionChatAfterGoal;
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Automatically stops showing matches remaining chat messages after reaching the the Default Target Series Level" +
- "\nOverrides other post-match chat notification settings");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Skip remaining matches chat notifications after default level is achieved");
+ var skipProgressionToastAfterGoal = Configuration.SkipProgressionToastAfterGoal;
+ if (ImGui.Checkbox("###SkipProgressionToastAfterGoal", ref skipProgressionToastAfterGoal))
+ {
+ Configuration.SkipProgressionToastAfterGoal = skipProgressionToastAfterGoal;
+ Configuration.Save();
+ }
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text(
+ "Automatically stops showing EXP progression notification after reaching the Default Target Series Level" +
+ "\nOverrides other EXP notification settings");
+ ImGui.EndTooltip();
+ }
- ImGui.Separator();
-
- var showProgressionToastPostMatch = Configuration.ShowProgressionToastPostMatch;
- if (ImGui.Checkbox("##ShowProgressionToastPostMatch", ref showProgressionToastPostMatch))
- {
- Configuration.ShowProgressionToastPostMatch = showProgressionToastPostMatch;
- if (showProgressionToastPostMatch)
- Plugin.PvPAddon.EnablePostMatchProgressionToast();
- else
- Plugin.PvPAddon.DisablePostMatchProgressionToast();
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Shows a notification with current series level EXP progression after ALL PVP matches");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Show EXP progression after PVP matches");
+ ImGui.SameLine();
+ ImGui.Text("Skip EXP progression notifications after default level is achieved");
- ImGui.Text("Notification Type");
- int selectedPostMatchToastType = Configuration.PostmatchProgressionToastType;
- if (ImGui.Combo("##MatchOptions", ref selectedPostMatchToastType, ToastOptions, ToastOptions.Length))
- {
- switch (selectedPostMatchToastType)
+
+
+ var skipProgressionChatAfterGoal = Configuration.SkipProgressionChatAfterGoal;
+ if (ImGui.Checkbox("###SkipProgressionChatAfterGoal", ref skipProgressionChatAfterGoal))
{
- 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.SkipProgressionChatAfterGoal = skipProgressionChatAfterGoal;
+ Configuration.Save();
}
- Configuration.PostmatchProgressionToastType = selectedPostMatchToastType;
- Configuration.Save();
- }
- ImGui.Separator();
- ImGui.Text("Show matches until next level in chat post-game");
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text(
+ "Automatically stops showing matches remaining chat messages after reaching the the Default Target Series Level" +
+ "\nOverrides other post-match chat notification settings");
+ ImGui.EndTooltip();
+ }
+ ImGui.SameLine();
+ ImGui.Text("Skip remaining matches chat notifications after default level is achieved");
- var showCCMatchesRemainingPostGame = Configuration.ShowProgressionChatPostCC;
- if (ImGui.Checkbox("##ShowCCMatchesRemainingPostGame", ref showCCMatchesRemainingPostGame))
- {
- Configuration.ShowProgressionChatPostCC = showCCMatchesRemainingPostGame;
- if (showCCMatchesRemainingPostGame)
- Plugin.PvPAddon.EnableCrystallineConflictPostMatch();
- else
- Plugin.PvPAddon.DisableCrystallineConflictPostMatch();
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Show Wins/Losses needed until next Series Level in chat after Crystalline Conflict matches");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Crystalline Conflict");
+ ImGui.Separator();
- var showFLMatchesRemainingPostGame = Configuration.ShowProgressionChatPostFL;
- if (ImGui.Checkbox("##ShowFLMatchesRemainingPostGame", ref showFLMatchesRemainingPostGame))
- {
- Configuration.ShowProgressionChatPostFL = showFLMatchesRemainingPostGame;
- if (showFLMatchesRemainingPostGame && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
- Plugin.PvPAddon.EnableFrontlinePostMatch();
- else if (!showFLMatchesRemainingPostGame && !Configuration.TrackFrontlineBonus)
- Plugin.PvPAddon.DisableFrontlinePostMatch();
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Show placements needed until next Series Level in chat after Frontline matches\nRoulettes shown in parentheses");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Frontlines");
+ 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.SameLine();
- ImGui.Spacing();
- ImGui.SameLine();
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Shows a notification with current series level EXP progression after ALL PVP matches");
+ ImGui.EndTooltip();
+ }
- var trackFrontlineBonus = Configuration.TrackFrontlineBonus;
- if (ImGui.Checkbox("##TrackFrontlineBonus", ref trackFrontlineBonus))
- {
- Configuration.TrackFrontlineBonus = trackFrontlineBonus;
- if (trackFrontlineBonus && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
- Plugin.PvPAddon.EnableFrontlinePostMatch();
- else if(!trackFrontlineBonus && !Configuration.ShowProgressionChatPostFL)
- Plugin.PvPAddon.DisableFrontlinePostMatch();
- Configuration.OutdatedFrontlineRewardBonus = true;
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("(EXPERIMENTAL) Track the reward bonus you get for consecutive losses in Frontline" +
- "\n3rd place = +10 percent bonus (max 50 percent)" +
- "\n2nd place = Current bonus is kept" +
- "\n1st Place = Bonus reset to 0\n");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Track Frontline Reward Bonus");
+ ImGui.SameLine();
+ ImGui.Text("Show EXP progression after PVP matches");
+ 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;
+ }
- var showRWMatchesRemainingPostGame = Configuration.ShowProgressionChatPostRW;
- if (ImGui.Checkbox("##ShowRWMatchesRemainingPostGame", ref showRWMatchesRemainingPostGame))
- {
- Configuration.ShowProgressionChatPostRW = showRWMatchesRemainingPostGame;
- if (showRWMatchesRemainingPostGame)
- Plugin.PvPAddon.EnableRivalWingsPostMatch();
- else
- Plugin.PvPAddon.DisableRivalWingsPostMatch();
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Show Wins/Losses needed until next Series Level in chat after Rival Wings matches");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Rival Wings");
-
- var OverrideShowMatchesToDefaultTargetGoal = Configuration.OverrideShowMatchesToDefaultTargetGoal;
- if(ImGui.Checkbox("##OverrideShowMatchesToDefaultTargetGoal", ref OverrideShowMatchesToDefaultTargetGoal)){
- Configuration.OverrideShowMatchesToDefaultTargetGoal = OverrideShowMatchesToDefaultTargetGoal;
- Configuration.Save();
- }
- if (ImGui.IsItemHovered())
- {
- ImGui.BeginTooltip();
- ImGui.Text("Show remaining matches to the Default Target rank instead of the next rank for postmatch chat notifications" +
- "\nThis only works if the Default Target rank is higher than your current rank, otherwise this setting will be ignored");
- ImGui.EndTooltip();
- }
- ImGui.SameLine();
- ImGui.Text("Show matches until Default Target Rank instead of next rank");
+ Configuration.PostmatchProgressionToastType = selectedPostMatchToastType;
+ Configuration.Save();
+ }
+ ImGui.Separator();
+ ImGui.Text("Show matches until next level in chat post-game");
- ImGui.Separator();
- ImGui.Spacing();
-
- var showMainWindowOnPVPReward = Configuration.ShowMainWindowOnPVPReward;
- if(ImGui.Checkbox("##ShowMainWindowOnPVPReward", ref showMainWindowOnPVPReward)){
- if(showMainWindowOnPVPReward)
- Plugin.EnablePVPRewardWindowAddon();
- else
- Plugin.DisablePVPRewardWindowAddon();
- Configuration.ShowMainWindowOnPVPReward = showMainWindowOnPVPReward;
- Configuration.Save();
+
+ var showCCMatchesRemainingPostGame = Configuration.ShowProgressionChatPostCC;
+ if (ImGui.Checkbox("##ShowCCMatchesRemainingPostGame", ref showCCMatchesRemainingPostGame))
+ {
+ Configuration.ShowProgressionChatPostCC = showCCMatchesRemainingPostGame;
+ if (showCCMatchesRemainingPostGame)
+ Plugin.PvPAddon.EnableCrystallineConflictPostMatch();
+ else
+ Plugin.PvPAddon.DisableCrystallineConflictPostMatch();
+ Configuration.Save();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text(
+ "Show Wins/Losses needed until next Series Level in chat after Crystalline Conflict matches");
+ ImGui.EndTooltip();
+ }
+
+ ImGui.SameLine();
+ ImGui.Text("Crystalline Conflict");
+
+
+ var showFLMatchesRemainingPostGame = Configuration.ShowProgressionChatPostFL;
+ if (ImGui.Checkbox("##ShowFLMatchesRemainingPostGame", ref showFLMatchesRemainingPostGame))
+ {
+ Configuration.ShowProgressionChatPostFL = showFLMatchesRemainingPostGame;
+ if (showFLMatchesRemainingPostGame && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
+ Plugin.PvPAddon.EnableFrontlinePostMatch();
+ else if (!showFLMatchesRemainingPostGame && !Configuration.TrackFrontlineBonus)
+ Plugin.PvPAddon.DisableFrontlinePostMatch();
+ Configuration.Save();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text(
+ "Show placements needed until next Series Level in chat after Frontline matches\nRoulettes shown in parentheses");
+ ImGui.EndTooltip();
+ }
+
+ ImGui.SameLine();
+ ImGui.Text("Frontlines");
+
+ ImGui.SameLine();
+ ImGui.Spacing();
+ ImGui.SameLine();
+
+ var trackFrontlineBonus = Configuration.TrackFrontlineBonus;
+ if (ImGui.Checkbox("##TrackFrontlineBonus", ref trackFrontlineBonus))
+ {
+ Configuration.TrackFrontlineBonus = trackFrontlineBonus;
+ if (trackFrontlineBonus && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
+ Plugin.PvPAddon.EnableFrontlinePostMatch();
+ else if (!trackFrontlineBonus && !Configuration.ShowProgressionChatPostFL)
+ Plugin.PvPAddon.DisableFrontlinePostMatch();
+ Configuration.OutdatedFrontlineRewardBonus = true;
+ Configuration.Save();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("(EXPERIMENTAL) Track the reward bonus you get for consecutive losses in Frontline" +
+ "\n3rd place = +10 percent bonus (max 50 percent)" +
+ "\n2nd place = Current bonus is kept" +
+ "\n1st Place = Bonus reset to 0\n");
+ ImGui.EndTooltip();
+ }
+
+ ImGui.SameLine();
+ ImGui.Text("Track Frontline Reward Bonus");
+
+
+ var showRWMatchesRemainingPostGame = Configuration.ShowProgressionChatPostRW;
+ if (ImGui.Checkbox("##ShowRWMatchesRemainingPostGame", ref showRWMatchesRemainingPostGame))
+ {
+ Configuration.ShowProgressionChatPostRW = showRWMatchesRemainingPostGame;
+ if (showRWMatchesRemainingPostGame)
+ Plugin.PvPAddon.EnableRivalWingsPostMatch();
+ else
+ Plugin.PvPAddon.DisableRivalWingsPostMatch();
+ Configuration.Save();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Show Wins/Losses needed until next Series Level in chat after Rival Wings matches");
+ ImGui.EndTooltip();
+ }
+
+ ImGui.SameLine();
+ ImGui.Text("Rival Wings");
+
+ var OverrideShowMatchesToDefaultTargetGoal = Configuration.OverrideShowMatchesToDefaultTargetGoal;
+ if (ImGui.Checkbox("##OverrideShowMatchesToDefaultTargetGoal", ref OverrideShowMatchesToDefaultTargetGoal))
+ {
+ Configuration.OverrideShowMatchesToDefaultTargetGoal = OverrideShowMatchesToDefaultTargetGoal;
+ Configuration.Save();
+ }
+
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text(
+ "Show remaining matches to the Default Target rank instead of the next rank for postmatch chat notifications" +
+ "\nThis only works if the Default Target rank is higher than your current rank, otherwise this setting will be ignored");
+ ImGui.EndTooltip();
+ }
+
+ ImGui.SameLine();
+ ImGui.Text("Show matches until Default Target Rank instead of next rank");
+
+
+ ImGui.EndTabItem();
}
- if (ImGui.IsItemHovered())
+
+
+ // User Interface Tab
+ if (ImGui.BeginTabItem("User Interface"))
{
- ImGui.BeginTooltip();
- ImGui.Text("Automatically open the calculator window when viewing Series Malmstone rewards");
- ImGui.EndTooltip();
+ var showMainWindowOnPVPReward = Configuration.ShowMainWindowOnPVPReward;
+ if (ImGui.Checkbox("##ShowMainWindowOnPVPReward", ref showMainWindowOnPVPReward))
+ {
+ if (showMainWindowOnPVPReward)
+ Plugin.EnablePVPRewardWindowAddon();
+ else
+ Plugin.DisablePVPRewardWindowAddon();
+ Configuration.ShowMainWindowOnPVPReward = showMainWindowOnPVPReward;
+ Configuration.Save();
+ }
+ if (ImGui.IsItemHovered())
+ {
+ ImGui.BeginTooltip();
+ ImGui.Text("Automatically open the calculator window when viewing Series Malmstone rewards");
+ ImGui.EndTooltip();
+ }
+ ImGui.SameLine();
+ ImGui.Text("Show calculations when viewing Series Malmstones");
+ ImGui.EndTabItem();
}
- ImGui.SameLine();
- ImGui.Text("Show calculations when viewing Series Malmstones");
+ ImGui.EndTabBar();
+ ImGui.Separator();
ImGui.Text("Changes saved automatically");
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage