diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index afacdad6e..ddba32d0c 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -49,22 +49,7 @@ void DisplayTimeHHMMSS(uint32_t timeInTenthsOfSeconds, const char* text, ImVec4 ImGui::Text(text); ImGui::SameLine(); - - // Hack to keep the timers aligned and prevent them from shifting around - // Put a leading zero in front of the seconds or minutes if they're less than 10 - if (mm < 10 && ss < 10) { - ImGui::Text("%u:0%u:0%u.%u", hh, mm, ss, ds); - } - if (mm < 10 && ss >= 10) { - ImGui::Text("%u:0%u:%u.%u", hh, mm, ss, ds); - } - if (mm >= 10 && ss < 10) { - ImGui::Text("%u:%u:0%u.%u", hh, mm, ss, ds); - } - if (mm >= 10 && ss >= 10) { - ImGui::Text("%u:%u:%u.%u", hh, mm, ss, ds); - } - + ImGui::Text("%2u:%02u:%02u.%u", hh, mm, ss, ds); ImGui::PopStyleColor(); } @@ -85,20 +70,7 @@ void DisplayStat(const char* text, uint32_t value) { ImGui::Text(text); ImGui::SameLine(); - // Hack to keep the digits properly aligned in the column - if (value < 10) { - ImGui::Text(" %u", value); - } else if (value < 100) { - ImGui::Text(" %u", value); - } else if (value < 1000) { - ImGui::Text(" %u", value); - } else if (value < 10000) { - ImGui::Text(" %u", value); - } else if (value < 100000) { - ImGui::Text(" %u", value); - } else { - ImGui::Text("%u", value); - } + ImGui::Text("%7u", value); } void DisplayStatIfNonZero(const char* text, uint32_t value) {