canvi de pc

treballant en enter name
This commit is contained in:
2025-02-06 14:59:25 +01:00
parent 3cebee2ae4
commit 44e4ca490d
7 changed files with 33 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ void EnterName::init()
// Pone la lista de indices para que refleje el nombre
updateCharacterIndex();
// Actualiza el nombre para que ocupe 8 espacios
// Actualiza el nombre para que ocupe todos los espacios
updateName();
}
@@ -30,7 +30,7 @@ void EnterName::init()
void EnterName::incPosition()
{
position_++;
position_ = std::min(position_, NAME_LENGHT - 1);
position_ = std::min(position_, NAME_LENGHT);
checkIfPositionHasBeenUsed();
}
@@ -118,7 +118,9 @@ void EnterName::checkIfPositionHasBeenUsed()
auto used = position_has_been_used_[position_];
if (!used && position_ > 0)
{
character_index_[position_] = character_index_[position_ - 1];
}
position_has_been_used_[position_] = true;
updateName();