feat(glue): add CCharacterSelection::GetCharacterDisplay

This commit is contained in:
fallenoak committed 2025-10-11 20:42:48 -05:00
1 parent fb00da2899
commit d536d2c353
2 files changed
+9

No files matched your search

+8
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;
+1
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();