From 4bac816e375da2be6a38a3a11fd4bdaa3934bbb3 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 20 Oct 2025 21:07:22 +0200 Subject: [PATCH] =?UTF-8?q?style:=20meeees=20retocs=20a=20la=20pantalla=20?= =?UTF-8?q?de=20c=C3=A0rrega?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/resource.cpp | 19 ++++++++++--------- source/resource.hpp | 8 +++++--- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/source/resource.cpp b/source/resource.cpp index 8af057c..3d7a05e 100644 --- a/source/resource.cpp +++ b/source/resource.cpp @@ -789,15 +789,16 @@ void Resource::renderProgress() { screen->start(); screen->clean(); - auto color = param.resource.color; + auto text_color = param.resource.color; + auto bar_color = param.resource.color.DARKEN(100); const auto TEXT_HEIGHT = loading_text_->getCharacterSize(); // Dibuja el interior de la barra de progreso - SDL_SetRenderDrawColor(renderer, param.resource.color.r, param.resource.color.g, param.resource.color.b, param.resource.color.a); + SDL_SetRenderDrawColor(renderer, bar_color.r, bar_color.g, bar_color.b, bar_color.a); SDL_RenderFillRect(renderer, &loading_full_rect_); // Dibuja el marco de la barra de progreso - SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.a); + SDL_SetRenderDrawColor(renderer, bar_color.r, bar_color.g, bar_color.b, bar_color.a); SDL_RenderRect(renderer, &loading_wired_rect_); // Escribe el texto de carga encima de la barra @@ -806,7 +807,7 @@ void Resource::renderProgress() { loading_wired_rect_.x, loading_wired_rect_.y - 9, Lang::getText("[RESOURCE] LOADING") + " : " + loading_resource_name_, - param.resource.color); + text_color); */ // Muestra nombre de la aplicación @@ -816,7 +817,7 @@ void Resource::renderProgress() { param.game.game_area.center_y - TEXT_HEIGHT, spaceBetweenLetters(std::string(Version::APP_NAME)), 1, - param.resource.color); + text_color); // Muestra la versión loading_text_->writeDX( @@ -825,24 +826,24 @@ void Resource::renderProgress() { param.game.game_area.center_y + TEXT_HEIGHT, "(" + std::string(Version::GIT_HASH) + ")", 1, - param.resource.color); + text_color); // Muestra información del monitor desplazada hacia abajo /*loading_text_->writeColored( X_PADDING, Y_PADDING + 18, screen->getDisplayMonitorName(), - param.resource.color); + text_color); loading_text_->writeColored( X_PADDING, Y_PADDING + 27, std::to_string(screen->getDisplayMonitorWidth()) + "x" + std::to_string(screen->getDisplayMonitorHeight()), - param.resource.color); + text_color); loading_text_->writeColored( X_PADDING, Y_PADDING + 36, std::to_string(screen->getDisplayMonitorRefreshRate()) + "Hz", - param.resource.color);*/ + text_color);*/ // Renderiza el frame en pantalla screen->coreRender(); diff --git a/source/resource.hpp b/source/resource.hpp index 02e847c..597b764 100644 --- a/source/resource.hpp +++ b/source/resource.hpp @@ -120,10 +120,12 @@ class Resource { } }; - // --- Constantes para la barra de progreso --- - static constexpr float X_PADDING = 20.0F; + // --- Constantes para la pantalla de carga --- + static constexpr float X_PADDING = 60.0F; static constexpr float Y_PADDING = 20.0F; - static constexpr float BAR_HEIGHT = 10.0F; + static constexpr float BAR_HEIGHT = 5.0F; + static constexpr Color BAR_COLOR = Color(128, 128, 128); + static constexpr Color TEXT_COLOR = Color(255, 255, 255); // --- Modo de carga --- LoadingMode loading_mode_;