1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Expose 'Embedded Windows Mode' as Editor and Project Settings

This commit is contained in:
Dominik 'dreamsComeTrue' Jasiński
2020-03-28 21:56:50 +01:00
parent a30bfe5176
commit 7af84d7213
3 changed files with 14 additions and 1 deletions

View File

@@ -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)