aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2018-04-11 09:28:14 +0200
committerRémi Verschelde2018-04-11 09:28:14 +0200
commitfbc61374ca267545a45e00c44e13433dd2c1b1a9 (patch)
treef91e37ddf38734b0e16139950675ccf8746d62eb /scene/gui/tree.cpp
parentfa97ec23858d9c997e7c33ceecb292c5ab75c531 (diff)
downloadgodot-fbc61374ca267545a45e00c44e13433dd2c1b1a9.tar.gz
godot-fbc61374ca267545a45e00c44e13433dd2c1b1a9.tar.zst
godot-fbc61374ca267545a45e00c44e13433dd2c1b1a9.zip
Use internal physics processing for Nodes' internal logic
Diffstat (limited to '')
-rw-r--r--scene/gui/tree.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index e7f63997f..1d2761276 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2545,7 +2545,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
if (drag_speed == 0) {
drag_touching_deaccel = false;
drag_touching = false;
- set_physics_process(false);
+ set_physics_process_internal(false);
} else {
drag_touching_deaccel = true;
@@ -2611,7 +2611,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
break;
if (drag_touching) {
- set_physics_process(false);
+ set_physics_process_internal(false);
drag_touching_deaccel = false;
drag_touching = false;
drag_speed = 0;
@@ -2626,7 +2626,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
drag_touching_deaccel = false;
if (drag_touching) {
- set_physics_process(true);
+ set_physics_process_internal(true);
}
if (b->get_button_index() == BUTTON_LEFT) {
@@ -2829,7 +2829,7 @@ void Tree::_notification(int p_what) {
drop_mode_flags = 0;
scrolling = false;
- set_physics_process(false);
+ set_physics_process_internal(false);
update();
}
if (p_what == NOTIFICATION_DRAG_BEGIN) {
@@ -2837,10 +2837,10 @@ void Tree::_notification(int p_what) {
single_select_defer = NULL;
if (cache.scroll_speed > 0 && get_rect().has_point(get_viewport()->get_mouse_position() - get_global_position())) {
scrolling = true;
- set_physics_process(true);
+ set_physics_process_internal(true);
}
}
- if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
+ if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
if (drag_touching) {
@@ -2853,7 +2853,7 @@ void Tree::_notification(int p_what) {
if (pos < 0) {
pos = 0;
turnoff = true;
- set_physics_process(false);
+ set_physics_process_internal(false);
drag_touching = false;
drag_touching_deaccel = false;
}
@@ -2873,7 +2873,7 @@ void Tree::_notification(int p_what) {
drag_speed = sgn * val;
if (turnoff) {
- set_physics_process(false);
+ set_physics_process_internal(false);
drag_touching = false;
drag_touching_deaccel = false;
}