Afegit outline al text 2x

corregit el marcador durant el Player::State::RECOVER
This commit is contained in:
2025-08-24 14:37:30 +02:00
parent 32e9da55ef
commit 74f6fe3501
8 changed files with 72 additions and 74 deletions

View File

@@ -45,7 +45,10 @@ void EnterName::incPosition() {
} else if (position_ > 0) // No es necesario verificar position_ < MAX_NAME_LENGTH
{
// Copiamos el índice del carácter anterior si es posible.
character_index_[position_] = character_index_[position_ - 1];
//character_index_[position_] = character_index_[position_ - 1];
// Ponemos el caracter "espacio"
character_index_[position_] = 0;
} else {
// Si position_ es 0, inicializamos el carácter actual.
character_index_[position_] = 0;
@@ -149,7 +152,7 @@ auto EnterName::getRandomName() -> std::string {
}
// Obtiene el nombre final introducido
auto EnterName::getFinalName() -> std::string {
auto name = trim(name_.substr(0, position_));
auto name = trim(name_.substr(0, position_ + 1)); // Devuelve el texto intruducido incluyendo el del selector
if (name.empty()) {
name = getRandomName();
}