1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix overlap of timer and fps widgets

This commit is contained in:
nordsoft 2023-08-28 15:09:15 +04:00
parent b5417c667c
commit 432ed18579
2 changed files with 4 additions and 4 deletions

View File

@ -184,11 +184,11 @@ Point CGuiHandler::screenDimensions() const
void CGuiHandler::drawFPSCounter() 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); uint32_t black = SDL_MapRGB(screen->format, 10, 10, 10);
SDL_FillRect(screen, &overlay, black); SDL_FillRect(screen, &overlay, black);
std::string fps = std::to_string(framerate().getFramerate()); 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() bool CGuiHandler::amIGuiThread()

View File

@ -3,7 +3,7 @@
[ [
{ //backgound color { //backgound color
"type": "drawRect", "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] "color": [10, 10, 10, 255]
}, },
@ -21,7 +21,7 @@
"alignment": "left", "alignment": "left",
"color": "yellow", "color": "yellow",
"text": "", "text": "",
"position": {"x": 24, "y": 2} "position": {"x": 26, "y": 2}
}, },
], ],