summaryrefslogtreecommitdiffstats
path: root/scene/main/scene_tree.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-02-20 20:25:39 +0100
committerkobewi <kobewi4e@gmail.com>2023-02-20 20:25:39 +0100
commit55b50703d7d5cc6322f0806f7580ac31e8553f73 (patch)
tree9226293470329e1dfcae99dc6a4d7ee20f1b5baf /scene/main/scene_tree.cpp
parent9c960a8c2494eb826a557a7ffc96dd4547f9d31e (diff)
downloadredot-engine-55b50703d7d5cc6322f0806f7580ac31e8553f73.tar.gz
Prevent off-screen controls in editor
Diffstat (limited to 'scene/main/scene_tree.cpp')
-rw-r--r--scene/main/scene_tree.cpp4
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)));