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:
parent
b5417c667c
commit
432ed18579
@ -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()
|
||||||
|
@ -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}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user