diff --git a/source/core/defaults/hud.hpp b/source/core/defaults/hud.hpp index 072a536..9b3e608 100644 --- a/source/core/defaults/hud.hpp +++ b/source/core/defaults/hud.hpp @@ -3,6 +3,8 @@ #pragma once +#include + namespace Defaults::Hud { // Marcador (scoreboard inferior). Usado por GameScene::drawScoreboard() @@ -29,13 +31,14 @@ namespace Defaults::Hud { // Overlay de debug (FPS, métriques) en coordenades lògiques (1280×720). namespace DebugOverlay { - constexpr float X = 12.0F; - constexpr float Y_FPS = 12.0F; + constexpr float X = 30.0F; + constexpr float Y_FPS = 24.0F; constexpr float LINE_HEIGHT = 18.0F; // separació entre línies (scale 0.4 → ~16 px alt) constexpr float TEXT_SCALE = 0.4F; constexpr float TEXT_SPACING = 2.0F; constexpr float BRIGHTNESS = 1.0F; - constexpr float FPS_UPDATE_INTERVAL = 0.5F; // Cadencia d'actualització del FPS visible + constexpr float FPS_UPDATE_INTERVAL = 0.5F; // Cadencia d'actualització del FPS visible + constexpr SDL_Color COLOR = {.r = 255, .g = 215, .b = 0, .a = 255}; // #FFD700 — daurat } // namespace DebugOverlay } // namespace Defaults::Hud diff --git a/source/core/system/debug_overlay.cpp b/source/core/system/debug_overlay.cpp index 5434143..948a5f9 100644 --- a/source/core/system/debug_overlay.cpp +++ b/source/core/system/debug_overlay.cpp @@ -42,17 +42,20 @@ namespace System { Vec2{.x = Cfg::X, .y = Cfg::Y_FPS}, Cfg::TEXT_SCALE, Cfg::TEXT_SPACING, - Cfg::BRIGHTNESS); + Cfg::BRIGHTNESS, + Cfg::COLOR); text_.render(VSYNC_TEXT, Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + Cfg::LINE_HEIGHT}, Cfg::TEXT_SCALE, Cfg::TEXT_SPACING, - Cfg::BRIGHTNESS); + Cfg::BRIGHTNESS, + Cfg::COLOR); text_.render(AA_TEXT, Vec2{.x = Cfg::X, .y = Cfg::Y_FPS + (2.0F * Cfg::LINE_HEIGHT)}, Cfg::TEXT_SCALE, Cfg::TEXT_SPACING, - Cfg::BRIGHTNESS); + Cfg::BRIGHTNESS, + Cfg::COLOR); } } // namespace System