fix: format timer
All checks were successful
Linux arm64 / Build (push) Successful in 26s

This commit is contained in:
2025-02-01 10:56:02 +01:00
parent 6d96455ac4
commit 3863c812c8

View File

@@ -18,7 +18,7 @@ public class TimerRenderer {
int seconds = (int) remainingTime; int seconds = (int) remainingTime;
int minutes = seconds / 60; int minutes = seconds / 60;
seconds %= 60; seconds %= 60;
String text = minutes + ":" + seconds; String text = String.format("%02d:%02d", minutes, seconds);
var textSize = ImGui.calcTextSize(text); var textSize = ImGui.calcTextSize(text);
ImGui.setCursorPosX(ImGui.getIO().getDisplaySizeX() / 2.0f - textSize.x / 2.0f); ImGui.setCursorPosX(ImGui.getIO().getDisplaySizeX() / 2.0f - textSize.x / 2.0f);
ImGui.text(text); ImGui.text(text);