From 9d8103d67a1f45332cf80c3fac4f62bec65107e6 Mon Sep 17 00:00:00 2001 From: Caladius Date: Mon, 11 Mar 2024 18:31:19 -0400 Subject: [PATCH] Update Enable Removals button to Edit Splits and fixed scenarios where Best and Previous Best could be identical. --- soh/soh/Enhancements/timesplits/TimeSplits.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.cpp b/soh/soh/Enhancements/timesplits/TimeSplits.cpp index 429af0180..e9667dfbb 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.cpp +++ b/soh/soh/Enhancements/timesplits/TimeSplits.cpp @@ -579,7 +579,7 @@ void DrawTimeSplitOptions() { status = "List has been reset"; statusColor = COLOR_RED; } - UIWidgets::EnhancementCheckbox("Enable Removals", "gTimeSplit.EnableEdits", false); + UIWidgets::EnhancementCheckbox("Edit Splits", "gTimeSplit.EnableEdits", false); ImGui::TextColored(statusColor, status.c_str()); UIWidgets::PaddedSeparator(); } @@ -672,11 +672,16 @@ void DrawTimeSplitSplits(){ ImGui::TextWrapped(itemNamer.c_str()); } ImGui::TableNextColumn(); + // Current Best (Removal) - needs work if (splitBest[i] != 100000) { - if (ImGui::Button(std::string(formatTimestampTimeSplit(splitBest[i])).c_str(), - ImVec2(85.0f, 30.0f))) { + if (splitBest[i] != splitPreviousBest[i]) { + if (ImGui::Button(std::string(formatTimestampTimeSplit(splitBest[i])).c_str(), ImVec2(85.0f, 30.0f))) { splitBest[i] = 100000; + } + } else { + ImGui::TextColored(COLOR_WHITE, "No Change"); } + } else { ImGui::TextColored(COLOR_RED, "No Data"); }