Browse Source

Fix overlap of timer and fps widgets

nordsoft 2 years ago
parent
commit
432ed18579
2 changed files with 4 additions and 4 deletions
  1. 2 2
      client/gui/CGuiHandler.cpp
  2. 2 2
      config/widgets/turnTimer.json

+ 2 - 2
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()

+ 2 - 2
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}
 		},
 	],