diff options
author | hnOsmium0001 <[email protected]> | 2022-05-07 17:27:01 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-05-07 17:27:01 -0700 |
commit | 921f756855b9e19363cb79355d12bb8d683ffc06 (patch) | |
tree | 55b2cac14f3498e36860039b8c8c3ea698c7db82 /source/App.cpp | |
parent | 1d924459c84b9d5fbd6c08743f733abad5a03c2b (diff) |
Reduce dependency between editor headers and main game headers
Diffstat (limited to 'source/App.cpp')
-rw-r--r-- | source/App.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/App.cpp b/source/App.cpp index 15ffd27..9e8a298 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -65,11 +65,15 @@ bool App::IsEditorVisible() const { void App::SetEditorVisible(bool visible) { if (mEditorVisible != visible) { - mEditorVisible = visible; if (visible) { +#if BRUSSEL_ENABLE_EDITOR + mEditorVisible = true; if (mEditor == nullptr) { - mEditor = std::make_unique<EditorInstance>(this); + mEditor = IEditor::CreateInstance(this); } +#endif + } else { + mEditorVisible = false; } } } |