Auto-select newly created character in selection screen

After creating a character, automatically select it in the character
list instead of defaulting to the previously selected character.

Changes:
- Added selectCharacterByName() method to CharacterScreen
- Store created character name in Application
- On creation success, auto-select the new character by name
- Falls back to saved selection if new character name doesn't match
This commit is contained in:
Kelsi 2026-02-09 22:51:13 -08:00
parent 743b9c7333
commit 5afc9a57d1
4 changed files with 39 additions and 4 deletions

View file

@ -107,6 +107,7 @@ private:
AppState state = AppState::AUTHENTICATION;
bool running = false;
std::string pendingCreatedCharacterName_; // Auto-select after character creation
bool playerCharacterSpawned = false;
bool npcsSpawned = false;
bool spawnSnapToGround = true;

View file

@ -49,12 +49,18 @@ public:
*/
void setStatus(const std::string& message);
/**
* Select character by name (used after character creation)
*/
void selectCharacterByName(const std::string& name);
private:
// UI state
int selectedCharacterIndex = -1;
bool characterSelected = false;
uint64_t selectedCharacterGuid = 0;
bool restoredLastCharacter = false;
std::string newlyCreatedCharacterName; // Auto-select this character if set
// Status
std::string statusMessage;