mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
743b9c7333
commit
5afc9a57d1
4 changed files with 39 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue