diff options
author | kobewi <kobewi4e@gmail.com> | 2023-04-07 17:44:38 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-07 17:44:38 +0200 |
commit | 88d446f6c6eff3e3bb3013099325b9d37ce3aad3 (patch) | |
tree | ce1fc5f7f683fbefdf2c1cb9eb8e590f4000876d /scene/main | |
parent | 87a9d2c87e5314d21a554077ae5e61c8284d1dc7 (diff) |
Prevent off-screen controls in editor
(cherry picked from commit 55b50703d7d5cc6322f0806f7580ac31e8553f73)
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/scene_tree.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index fbe11c94d1..9327102cc8 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1408,6 +1408,10 @@ SceneTree::SceneTree() { root->set_name("root"); root->set_title(GLOBAL_GET("application/config/name")); + if (Engine::get_singleton()->is_editor_hint()) { + root->set_wrap_controls(true); + } + #ifndef _3D_DISABLED if (!root->get_world_3d().is_valid()) { root->set_world_3d(Ref<World3D>(memnew(World3D))); |