Limitat el nom a tres caracters

This commit is contained in:
2025-05-27 07:44:50 +02:00
parent a3cd1b9887
commit 9bc07b2bcb
6 changed files with 28 additions and 28 deletions

View File

@@ -266,7 +266,7 @@ void Scoreboard::fillPanelTextures()
SDL_FRect rect = {enter_name_pos_.x, enter_name_pos_.y, 5.0f, 7.0f};
// Recorre todos los slots de letras del nombre
for (size_t j = 0; j < MAX_NAME_LENGHT; ++j)
for (size_t j = 0; j < NAME_SIZE; ++j)
{
// Selecciona el color
const Color color = j < selector_pos_[i] ? ORANGE_SOFT_COLOR.lighten() : Color(0xFF, 0xFF, 0xEB);
@@ -387,7 +387,7 @@ void Scoreboard::recalculateAnchors()
slot4_4_ = {COL, ROW4};
// Primer cuadrado para poner el nombre de record
const int enter_name_lenght = text_scoreboard_->lenght(std::string(MAX_NAME_LENGHT, 'A'));
const int enter_name_lenght = text_scoreboard_->lenght(std::string(NAME_SIZE, 'A'));
enter_name_pos_.x = COL - (enter_name_lenght / 2);
enter_name_pos_.y = ROW4;