mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-02-04 09:09:09 +00:00
feat(glue): display list of characters
This commit is contained in:
parent
d536140d63
commit
f28f4b0379
10 changed files with 174 additions and 8 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#include "glue/CCharacterSelection.hpp"
|
||||
#include "model/CM2Shared.hpp"
|
||||
#include "ui/CSimpleModelFFX.hpp"
|
||||
#include "client/ClientServices.hpp"
|
||||
#include "net/Connection.hpp"
|
||||
|
||||
TSGrowableArray<CharacterSelectionDisplay> CCharacterSelection::s_characterList;
|
||||
CSimpleModelFFX* CCharacterSelection::s_modelFrame;
|
||||
|
|
@ -38,3 +40,30 @@ void CCharacterSelection::SetBackgroundModel(const char* modelPath) {
|
|||
void CCharacterSelection::SetCharFacing(float facing) {
|
||||
// TODO:
|
||||
}
|
||||
|
||||
void CCharacterSelection::ClearCharacterList() {
|
||||
}
|
||||
|
||||
void CCharacterSelection::UpdateCharacterList() {
|
||||
// TODO: ClearAddOnEnableState(0);
|
||||
// TODO: Proper implementation
|
||||
|
||||
auto& received = ClientServices::Connection()->m_characterList;
|
||||
CCharacterSelection::s_characterList.SetCount(received.Count());
|
||||
for (uint32_t i = 0; i < received.Count(); ++i) {
|
||||
CCharacterSelection::s_characterList[i].m_characterInfo = received[i];
|
||||
}
|
||||
|
||||
if (CCharacterSelection::GetNumCharacters()) {
|
||||
int32_t currentIndex = 0;
|
||||
FrameScript_SignalEvent(8, "%d", currentIndex + 1);
|
||||
} else {
|
||||
int32_t currentIndex = 0;
|
||||
FrameScript_SignalEvent(8, "%d", currentIndex + 1);
|
||||
}
|
||||
FrameScript_SignalEvent(7, nullptr);
|
||||
}
|
||||
|
||||
uint32_t CCharacterSelection::GetNumCharacters() {
|
||||
return s_characterList.Count();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue