feat(glue): add CCharacterSelection::GetCharacterDisplay

This commit is contained in:
fallenoak 2025-10-11 20:42:48 -05:00
parent fb00da2899
commit d536d2c353
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,14 @@ void CCharacterSelection::EnumerateCharactersCallback(const CHARACTER_INFO& info
// TODO // TODO
} }
const CharacterSelectionDisplay* CCharacterSelection::GetCharacterDisplay(int32_t index) {
if (index < 0 || index >= CCharacterSelection::s_characterList.Count()) {
return nullptr;
}
return &CCharacterSelection::s_characterList[index];
}
const CharacterSelectionDisplay* CCharacterSelection::GetSelectedCharacter() { const CharacterSelectionDisplay* CCharacterSelection::GetSelectedCharacter() {
if (CCharacterSelection::s_selectionIndex < 0 || CCharacterSelection::s_selectionIndex >= CCharacterSelection::s_characterList.Count()) { if (CCharacterSelection::s_selectionIndex < 0 || CCharacterSelection::s_selectionIndex >= CCharacterSelection::s_characterList.Count()) {
return nullptr; return nullptr;

View File

@ -33,6 +33,7 @@ class CCharacterSelection {
static void ClearCharacterList(); static void ClearCharacterList();
static void ClearCharacterModel(); static void ClearCharacterModel();
static void EnumerateCharactersCallback(const CHARACTER_INFO& info, void* param); static void EnumerateCharactersCallback(const CHARACTER_INFO& info, void* param);
static const CharacterSelectionDisplay* GetCharacterDisplay(int32_t index);
static const CharacterSelectionDisplay* GetSelectedCharacter(); static const CharacterSelectionDisplay* GetSelectedCharacter();
static void OnGetCharacterList(); static void OnGetCharacterList();
static void RenderPrep(); static void RenderPrep();