From 6e498a3781f5ccbbaa6cf5e407cf67722624760f Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 30 Nov 2023 11:31:45 -0500 Subject: prefer explicit callback system over events --- editor/editor.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'editor/editor.cpp') diff --git a/editor/editor.cpp b/editor/editor.cpp index 6f887ed..23a748f 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -650,25 +650,24 @@ void RecordImGuiSceneEditor() { } } -void RecordImGuiEditor() { +void PkeEditor_RecordImGui() { if (pkeSettings.isShowingEditor) { RecordImGuiEditorWrapper(); RecordImGuiEntityList(); RecordImGuiSceneEditor(); RecordImGuiUBO(); + Game_RecordImGui(); } } void PkeEditor_Setup() { shouldSetupEditor = false; PkeInput_ActivateSet(debugControlsHandle); - Event_RegisterCallback("RenderImGui", RecordImGuiEditor); } void PkeEditor_Disable() { shouldDisableEditor = false; PkeInput_DeactivateSet(debugControlsHandle); - Event_UnregisterCallback("RenderImGui", RecordImGuiEditor); } void PkeEditor_Teardown() { @@ -748,6 +747,4 @@ void PkeEditor_Init() { ActiveCamera = &cameraDefault; threadPoolHandle = PkeThreads_Init(1, 1); - - Event_RegisterCallback("GAME_TICK", PkeEditor_Tick); } -- cgit v1.2.3