style: meeees retocs a la pantalla de càrrega
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user