From 94b49dca49f0e42911b1a750d5e6345a5e93bab2 Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Sun, 8 Sep 2024 02:34:28 -0600 Subject: [PATCH] Prevent Variant Option #s --- XIVSlothCombo/Window/Functions/Presets.cs | 2 +- XIVSlothCombo/Window/Tabs/PvEFeatures.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/XIVSlothCombo/Window/Functions/Presets.cs b/XIVSlothCombo/Window/Functions/Presets.cs index 4234e5e58..37e552b93 100644 --- a/XIVSlothCombo/Window/Functions/Presets.cs +++ b/XIVSlothCombo/Window/Functions/Presets.cs @@ -68,7 +68,7 @@ internal unsafe static void DrawPreset(CustomComboPreset preset, CustomComboInfo ImGui.Spacing(); - if (ImGui.Checkbox($"{info.FancyName}###{i}", ref enabled)) + if (ImGui.Checkbox($"{info.FancyName}###{preset}{i}", ref enabled)) { if (enabled) { diff --git a/XIVSlothCombo/Window/Tabs/PvEFeatures.cs b/XIVSlothCombo/Window/Tabs/PvEFeatures.cs index 005cc8d50..2f4cecc1c 100644 --- a/XIVSlothCombo/Window/Tabs/PvEFeatures.cs +++ b/XIVSlothCombo/Window/Tabs/PvEFeatures.cs @@ -141,9 +141,9 @@ internal class PvEFeatures : ConfigWindow private static void DrawVariantContents(string jobName) { - int i = 0; foreach (var (preset, info) in groupedPresets[jobName].Where(x => PresetStorage.IsVariant(x.Preset))) { + int i = -1; InfoBox presetBox = new() { Color = Colors.Grey, BorderThickness = 1f, CurveRadius = 8f, ContentsAction = () => { Presets.DrawPreset(preset, info, ref i); } }; presetBox.Draw(); ImGuiHelpers.ScaledDummy(12.0f);