Fix miss in previous hookify cosmetics editor PR (#6006)

This commit is contained in:
Philip Dubé
2025-12-04 16:14:58 +00:00
committed by GitHub
parent 7e829a0780
commit f83f73d671

View File

@@ -2573,15 +2573,6 @@ void CosmeticsEditorWindow::DrawElement() {
UIWidgets::PopStyleTabs();
}
void RegisterOnLoadGameHook() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>(
[](int32_t fileNum) { ApplyOrResetCustomGfxPatches(); });
}
void RegisterOnGameFrameUpdateHook() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() { CosmeticsUpdateTick(); });
}
void CosmeticsEditorWindow::InitElement() {
// Convert the `current color` into the format that the ImGui color picker expects
for (auto& [id, cosmeticOption] : cosmeticOptions) {
@@ -2653,6 +2644,8 @@ void RegisterCosmeticHooks() {
COND_HOOK(OnGenerationCompletion, CVarGetInteger(CVAR_COSMETIC("RandomizeAllOnRandoGen"), 0),
[]() { CosmeticsEditor_RandomizeAll(); });
COND_HOOK(OnLoadGame, true, [](int32_t fileNum) { ApplyOrResetCustomGfxPatches(); });
COND_HOOK(OnGameFrameUpdate, true, CosmeticsUpdateTick);
}