Si no poses cap nom, tria un nom de jailer al azar

This commit is contained in:
2025-03-10 19:59:21 +01:00
parent e0c10f83d6
commit c88a277cba
6 changed files with 46 additions and 36 deletions

View File

@@ -263,7 +263,7 @@ void Scoreboard::fillPanelTextures()
SDL_Rect rect = {enter_name_pos_.x, enter_name_pos_.y, 5, 7};
// Recorre todos los slots de letras del nombre
for (size_t j = 0; j < NAME_LENGHT; ++j)
for (size_t j = 0; j < MAX_NAME_LENGHT; ++j)
{
// Selecciona el color
const Color color = j < selector_pos_[i] ? orange_soft_color.lighten() : Color(0xFF, 0xFF, 0xEB);
@@ -380,7 +380,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(NAME_LENGHT, 'A'));
const int enter_name_lenght = text_scoreboard_->lenght(std::string(MAX_NAME_LENGHT, 'A'));
enter_name_pos_.x = col - (enter_name_lenght / 2);
enter_name_pos_.y = row4;