Treballant en text independent de la resolucio

This commit is contained in:
2025-10-09 20:43:34 +02:00
parent f00b08b6be
commit 68381dc92d
4 changed files with 128 additions and 32 deletions

View File

@@ -83,6 +83,10 @@ class Engine {
int current_screen_width_ = DEFAULT_SCREEN_WIDTH;
int current_screen_height_ = DEFAULT_SCREEN_HEIGHT;
// Resolución física real de ventana/pantalla (para texto absoluto)
int physical_window_width_ = DEFAULT_SCREEN_WIDTH;
int physical_window_height_ = DEFAULT_SCREEN_HEIGHT;
// Sistema de temas (delegado a ThemeManager)
std::unique_ptr<ThemeManager> theme_manager_;
int theme_page_ = 0; // Página actual de temas (0 o 1) para acceso por Numpad
@@ -124,7 +128,7 @@ class Engine {
// Configuración del sistema de texto (constantes configurables)
static constexpr const char* TEXT_FONT_PATH = "data/fonts/determination.ttf";
static constexpr int TEXT_BASE_SIZE = 8; // Tamaño base para 240p
static constexpr int TEXT_BASE_SIZE = 24; // Tamaño base para 240p
static constexpr bool TEXT_ANTIALIASING = true; // true = suavizado, false = píxeles nítidos
// Métodos principales del loop
@@ -171,6 +175,7 @@ class Engine {
void setWindowZoom(int new_zoom);
void zoomIn();
void zoomOut();
void updatePhysicalWindowSize(); // Actualizar tamaño físico real de ventana
// Rendering
void addSpriteToBatch(float x, float y, float w, float h, int r, int g, int b, float scale = 1.0f);