diff options
author | rtk0c <[email protected]> | 2022-05-07 17:27:01 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-05-07 17:27:01 -0700 |
commit | 9fcdfe312fd9809a1cd52c08e7d8d7bd991a9fb3 (patch) | |
tree | c9820ea29a0d38c2adb7464386233415bfcccc10 /source/App.cpp | |
parent | f348347f205f51800d0628021f193e63f5833f8d (diff) |
Changeset: 25 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; } } } |