style: toquejant mes la pantalla de carrega
This commit is contained in:
@@ -79,6 +79,7 @@ auto Resource::get() -> Resource* { return Resource::instance; }
|
||||
Resource::Resource(LoadingMode mode)
|
||||
: loading_mode_(mode),
|
||||
loading_text_(nullptr) {
|
||||
Screen::get()->show();
|
||||
if (loading_mode_ == LoadingMode::PRELOAD) {
|
||||
loading_text_ = Screen::get()->getText();
|
||||
load();
|
||||
@@ -789,6 +790,7 @@ void Resource::renderProgress() {
|
||||
screen->clean();
|
||||
|
||||
auto color = param.resource.color;
|
||||
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);
|
||||
@@ -807,19 +809,20 @@ void Resource::renderProgress() {
|
||||
param.resource.color);
|
||||
*/
|
||||
|
||||
// Muestra nombre de la aplicación y versión
|
||||
// Muestra nombre de la aplicación
|
||||
loading_text_->writeDX(
|
||||
Text::CENTER | Text::COLOR,
|
||||
param.game.game_area.center_x,
|
||||
Y_PADDING,
|
||||
param.game.game_area.center_y - TEXT_HEIGHT,
|
||||
spaceBetweenLetters(std::string(Version::APP_NAME)),
|
||||
1,
|
||||
param.resource.color);
|
||||
|
||||
// Muestra la versión
|
||||
loading_text_->writeDX(
|
||||
Text::CENTER | Text::COLOR,
|
||||
param.game.game_area.center_x,
|
||||
Y_PADDING + 18,
|
||||
param.game.game_area.center_y + TEXT_HEIGHT,
|
||||
"(" + std::string(Version::GIT_HASH) + ")",
|
||||
1,
|
||||
param.resource.color);
|
||||
|
||||
Reference in New Issue
Block a user