diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index ae09ed3a..06bf184c 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -4985,9 +4985,10 @@ void GameScreen::renderActionBar(game::GameHandler& gameHandler) { char cdText[16]; float cd = slot.cooldownRemaining; - if (cd >= 3600.0f) snprintf(cdText, sizeof(cdText), "%dh", (int)cd / 3600); - else if (cd >= 60.0f) snprintf(cdText, sizeof(cdText), "%dm%ds", (int)cd / 60, (int)cd % 60); - else snprintf(cdText, sizeof(cdText), "%ds", (int)cd); + if (cd >= 3600.0f) snprintf(cdText, sizeof(cdText), "%dh", (int)cd / 3600); + else if (cd >= 60.0f) snprintf(cdText, sizeof(cdText), "%dm%ds", (int)cd / 60, (int)cd % 60); + else if (cd >= 5.0f) snprintf(cdText, sizeof(cdText), "%ds", (int)cd); + else snprintf(cdText, sizeof(cdText), "%.1f", cd); ImVec2 textSize = ImGui::CalcTextSize(cdText); float tx = cx - textSize.x * 0.5f; float ty = cy - textSize.y * 0.5f;