diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-04 07:58:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 07:58:53 +0200 |
commit | 9abb415d92f93c19abc390e135d1b073ea44d09a (patch) | |
tree | 148c2d37f07ccd863b07e704a005f3ff485cb14d /main/main.cpp | |
parent | 3d0c633e7b8a15473b2a21bdf498d23794f5d476 (diff) | |
parent | 7af84d7213e7de2ea429f11521bba96da82347ee (diff) |
Merge pull request #37391 from dreamsComeTrue/embedded-windows-mode
Expose 'Embedded Windows Mode' as Editor and Project Settings
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 2a525dbe5a..a53e52e485 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1723,7 +1723,9 @@ bool Main::start() { } #endif - if (single_window) { + bool embed_subwindows = GLOBAL_DEF("display/window/subwindows/embed_subwindows", false); + + if (single_window || (!project_manager && !editor && embed_subwindows)) { sml->get_root()->set_embed_subwindows_hint(true); } ResourceLoader::add_custom_loaders(); @@ -1942,6 +1944,12 @@ bool Main::start() { #ifdef TOOLS_ENABLED if (editor) { + bool editor_embed_subwindows = EditorSettings::get_singleton()->get_setting("interface/editor/single_window_mode"); + + if (editor_embed_subwindows) { + sml->get_root()->set_embed_subwindows_hint(true); + } + if (game_path != GLOBAL_GET("application/run/main_scene") || !editor_node->has_scenes_in_session()) { Error serr = editor_node->load_scene(local_game_path); if (serr != OK) |