From 432ed18579f59128175c5e2e67446570dc266c8a Mon Sep 17 00:00:00 2001 From: nordsoft Date: Mon, 28 Aug 2023 15:09:15 +0400 Subject: [PATCH] Fix overlap of timer and fps widgets --- client/gui/CGuiHandler.cpp | 4 ++-- config/widgets/turnTimer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/gui/CGuiHandler.cpp b/client/gui/CGuiHandler.cpp index c6bb020fd..504f404ad 100644 --- a/client/gui/CGuiHandler.cpp +++ b/client/gui/CGuiHandler.cpp @@ -184,11 +184,11 @@ Point CGuiHandler::screenDimensions() const void CGuiHandler::drawFPSCounter() { - static SDL_Rect overlay = { 0, 0, 64, 32}; + static SDL_Rect overlay = { 0, 0, 24, 24}; uint32_t black = SDL_MapRGB(screen->format, 10, 10, 10); SDL_FillRect(screen, &overlay, black); std::string fps = std::to_string(framerate().getFramerate()); - graphics->fonts[FONT_BIG]->renderTextLeft(screen, fps, Colors::YELLOW, Point(10, 10)); + graphics->fonts[FONT_BIG]->renderTextLeft(screen, fps, Colors::YELLOW, Point(4, 2)); } bool CGuiHandler::amIGuiThread() diff --git a/config/widgets/turnTimer.json b/config/widgets/turnTimer.json index c2c8b01cf..5965ed2f0 100644 --- a/config/widgets/turnTimer.json +++ b/config/widgets/turnTimer.json @@ -3,7 +3,7 @@ [ { //backgound color "type": "drawRect", - "rect": {"x": 4, "y": 4, "w": 68, "h": 24}, + "rect": {"x": 4, "y": 4, "w": 72, "h": 24}, "color": [10, 10, 10, 255] }, @@ -21,7 +21,7 @@ "alignment": "left", "color": "yellow", "text": "", - "position": {"x": 24, "y": 2} + "position": {"x": 26, "y": 2} }, ],