Afegit outline al text 2x
corregit el marcador durant el Player::State::RECOVER
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user