|
|
@@ -183,11 +183,17 @@ Point CGuiHandler::screenDimensions() const
|
|
|
|
|
|
void CGuiHandler::drawFPSCounter()
|
|
|
{
|
|
|
- static SDL_Rect overlay = { 0, 0, 24, 24};
|
|
|
+ int x = 7;
|
|
|
+ int y = screen->h-20;
|
|
|
+ int width3digitFPSIncludingPadding = 48;
|
|
|
+ int heightFPSTextIncludingPadding = 11;
|
|
|
+ static SDL_Rect overlay = { x, y, width3digitFPSIncludingPadding, heightFPSTextIncludingPadding};
|
|
|
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(4, 2));
|
|
|
+
|
|
|
+ std::string fps = std::to_string(framerate().getFramerate())+" FPS";
|
|
|
+
|
|
|
+ graphics->fonts[FONT_SMALL]->renderTextLeft(screen, fps, Colors::WHITE, Point(8, screen->h-22));
|
|
|
}
|
|
|
|
|
|
bool CGuiHandler::amIGuiThread()
|