Mes colorets
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
#include <SDL3/SDL.h>
|
||||
#include <algorithm> // Para find_if
|
||||
#include <array>
|
||||
#include <stdexcept> // Para runtime_error
|
||||
#include "asset.h" // Para Asset, AssetType
|
||||
#include <stdexcept> // Para runtime_error
|
||||
#include "asset.h" // Para Asset, AssetType
|
||||
#include "external/jail_audio.h" // Para JA_DeleteMusic, JA_DeleteSound, JA_LoadMusic
|
||||
#include "lang.h" // Para getText
|
||||
#include "screen.h" // Para Screen
|
||||
#include "text.h" // Para Text, loadTextFile
|
||||
struct JA_Music_t; // lines 11-11
|
||||
struct JA_Sound_t; // lines 12-12
|
||||
#include "lang.h" // Para getText
|
||||
#include "screen.h" // Para Screen
|
||||
#include "text.h" // Para Text, loadTextFile
|
||||
#include "param.h"
|
||||
struct JA_Music_t; // lines 11-11
|
||||
struct JA_Sound_t; // lines 12-12
|
||||
|
||||
// Singleton
|
||||
Resource *Resource::instance_ = nullptr;
|
||||
@@ -435,19 +436,22 @@ void Resource::renderProgress()
|
||||
screen->start();
|
||||
screen->clean();
|
||||
|
||||
// Establece el color de dibujo a blanco
|
||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
auto color = param.resource.color.darken();
|
||||
|
||||
// Dibuja la barra de progreso (marco y barra llena)
|
||||
SDL_RenderRect(renderer, &loading_wired_rect_);
|
||||
// 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_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_RenderRect(renderer, &loading_wired_rect_);
|
||||
|
||||
// Escribe el texto de carga encima de la barra
|
||||
loading_text_->write(
|
||||
loading_text_->writeColored(
|
||||
loading_wired_rect_.x,
|
||||
loading_wired_rect_.y - 9,
|
||||
Lang::getText("[RESOURCE] LOADING") + " : " + loading_resource_name_
|
||||
);
|
||||
Lang::getText("[RESOURCE] LOADING") + " : " + loading_resource_name_,
|
||||
param.resource.color);
|
||||
|
||||
// Renderiza el frame en pantalla
|
||||
screen->coreRender();
|
||||
|
||||
Reference in New Issue
Block a user