Remove ResetData

This commit is contained in:
rozlette 2025-05-13 19:51:34 -05:00
commit 5d0cede0d4
2 changed files with 5 additions and 11 deletions

View file

@ -1193,15 +1193,7 @@ void ActorViewerWindow::DrawElement() {
ImGui::EndDisabled();
}
void ActorViewerWindow::ResetData() {
display = nullptr;
category = ACTORCAT_SWITCH;
list.clear();
}
void ActorViewerWindow::InitElement() {
ResetData();
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorSpawn>([this](void* refActor) {
Actor* actor = static_cast<Actor*>(refActor);
@ -1224,7 +1216,11 @@ void ActorViewerWindow::InitElement() {
}
});
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([this](int16_t sceneNum) { ResetData(); });
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([this](int16_t sceneNum) {
display = nullptr;
category = ACTORCAT_SWITCH;
list.clear();
});
}
void ActorViewer_RegisterNameTagHooks() {

View file

@ -15,8 +15,6 @@ class ActorViewerWindow final : public Ship::GuiWindow {
void UpdateElement() override{};
private:
void ResetData();
Actor* display = nullptr;
int category = ACTORCAT_SWITCH;
std::vector<Actor*> list;