style: toquejant la pantalla de càrrega
This commit is contained in:
@@ -799,21 +799,33 @@ void Resource::renderProgress() {
|
||||
SDL_RenderRect(renderer, &loading_wired_rect_);
|
||||
|
||||
// Escribe el texto de carga encima de la barra
|
||||
/*
|
||||
loading_text_->writeColored(
|
||||
loading_wired_rect_.x,
|
||||
loading_wired_rect_.y - 9,
|
||||
Lang::getText("[RESOURCE] LOADING") + " : " + loading_resource_name_,
|
||||
param.resource.color);
|
||||
*/
|
||||
|
||||
// Muestra nombre de la aplicación y versión
|
||||
loading_text_->writeColored(
|
||||
X_PADDING,
|
||||
loading_text_->writeDX(
|
||||
Text::CENTER | Text::COLOR,
|
||||
param.game.game_area.center_x,
|
||||
Y_PADDING,
|
||||
std::string(Version::APP_NAME) + " (" + Version::GIT_HASH + ")",
|
||||
spaceBetweenLetters(std::string(Version::APP_NAME)),
|
||||
1,
|
||||
param.resource.color);
|
||||
|
||||
loading_text_->writeDX(
|
||||
Text::CENTER | Text::COLOR,
|
||||
param.game.game_area.center_x,
|
||||
Y_PADDING + 18,
|
||||
"(" + std::string(Version::GIT_HASH) + ")",
|
||||
1,
|
||||
param.resource.color);
|
||||
|
||||
// Muestra información del monitor desplazada hacia abajo
|
||||
loading_text_->writeColored(
|
||||
/*loading_text_->writeColored(
|
||||
X_PADDING,
|
||||
Y_PADDING + 18,
|
||||
screen->getDisplayMonitorName(),
|
||||
@@ -827,7 +839,7 @@ void Resource::renderProgress() {
|
||||
X_PADDING,
|
||||
Y_PADDING + 36,
|
||||
std::to_string(screen->getDisplayMonitorRefreshRate()) + "Hz",
|
||||
param.resource.color);
|
||||
param.resource.color);*/
|
||||
|
||||
// Renderiza el frame en pantalla
|
||||
screen->coreRender();
|
||||
|
||||
@@ -313,4 +313,16 @@ auto truncateWithEllipsis(const std::string& input, size_t length) -> std::strin
|
||||
return result;
|
||||
}
|
||||
return input.substr(0, length) + "...";
|
||||
}
|
||||
}
|
||||
|
||||
// Añade espacios entre las letras de un string
|
||||
auto spaceBetweenLetters(const std::string& input) -> std::string {
|
||||
std::string result;
|
||||
for (size_t i = 0; i < input.size(); ++i) {
|
||||
result += input[i];
|
||||
if (i != input.size() - 1) {
|
||||
result += ' ';
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ auto boolToString(bool value) -> std::string;
|
||||
auto boolToOnOff(bool value) -> std::string;
|
||||
auto toLower(const std::string& str) -> std::string;
|
||||
auto trim(const std::string& str) -> std::string;
|
||||
auto spaceBetweenLetters(const std::string& input) -> std::string;
|
||||
|
||||
// Dibujo
|
||||
void drawCircle(SDL_Renderer* renderer, int32_t center_x, int32_t center_y, int32_t radius);
|
||||
|
||||
Reference in New Issue
Block a user