diff options
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor-main.cpp | 2 | ||||
| -rw-r--r-- | editor/editor-plugin.cpp | 10 | ||||
| -rw-r--r-- | editor/editor-plugin.hpp | 8 | ||||
| -rw-r--r-- | editor/editor.cpp | 3 |
4 files changed, 21 insertions, 2 deletions
diff --git a/editor/editor-main.cpp b/editor/editor-main.cpp index 9bb6d8f..541e11f 100644 --- a/editor/editor-main.cpp +++ b/editor/editor-main.cpp @@ -22,8 +22,6 @@ int main(int argc, char *argv[]) { struct pk_membucket *bkt_editor = pk_mem_bucket_create("pke-editor", 2048, PK_MEMBUCKET_FLAG_NONE); // setup { - pkeSettings.isSimulationPaused = true; - pkeSettings.isShowingEditor = true; PKEPluginInterface itfc; itfc.OnInit = PkeEditor_Init; itfc.OnTick = PkeEditor_Tick; diff --git a/editor/editor-plugin.cpp b/editor/editor-plugin.cpp new file mode 100644 index 0000000..4acdb6c --- /dev/null +++ b/editor/editor-plugin.cpp @@ -0,0 +1,10 @@ + +#include "editor-plugin.hpp" +#include "editor.hpp" + +struct PKEPluginInterface pkePluginInterface = { + .OnInit = PkeEditor_Init, + .OnTick = PkeEditor_Tick, + .OnTeardown = PkeEditor_Teardown, + .OnImGuiRender = PkeEditor_RecordImGui, +}; diff --git a/editor/editor-plugin.hpp b/editor/editor-plugin.hpp new file mode 100644 index 0000000..b166a02 --- /dev/null +++ b/editor/editor-plugin.hpp @@ -0,0 +1,8 @@ +#ifndef PKE_EDITOR_PLUGIN_HPP +#define PKE_EDITOR_PLUGIN_HPP + +#include "plugin-types.hpp" + +extern PKEPluginInterface pkePluginInterface; + +#endif /* PKE_EDITOR_PLUGIN_HPP */ diff --git a/editor/editor.cpp b/editor/editor.cpp index 094e555..c9c673b 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -1953,6 +1953,9 @@ void PkeEditor_Teardown() { } void PkeEditor_Init() { + pkeSettings.isSimulationPaused = true; + pkeSettings.isShowingEditor = true; + PkeInputSet debugControlsSet{}; debugControlsSet.title = "debug-editor-controls"; debugControlsSet.actionCount = 14; |
