diff options
| author | AndreaCatania | 2017-09-30 16:19:07 +0200 |
|---|---|---|
| committer | AndreaCatania | 2017-09-30 16:19:07 +0200 |
| commit | 4537977d6dd2a76580d9ab611a18634efab55c74 (patch) | |
| tree | 387e51e9bb1ed9b322312243c8b7d520292f3122 /scene/gui/tree.cpp | |
| parent | 4f39ce32b9195405f934445b20059e86632b47f9 (diff) | |
| download | godot-4537977d6dd2a76580d9ab611a18634efab55c74.tar.gz godot-4537977d6dd2a76580d9ab611a18634efab55c74.tar.zst godot-4537977d6dd2a76580d9ab611a18634efab55c74.zip | |
Diffstat (limited to 'scene/gui/tree.cpp')
| -rw-r--r-- | scene/gui/tree.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 822136820..60c9c208d 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2492,7 +2492,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { if (drag_speed == 0) { drag_touching_deaccel = false; drag_touching = false; - set_fixed_process(false); + set_physics_process(false); } else { drag_touching_deaccel = true; @@ -2558,7 +2558,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { break; if (drag_touching) { - set_fixed_process(false); + set_physics_process(false); drag_touching_deaccel = false; drag_touching = false; drag_speed = 0; @@ -2573,7 +2573,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_fixed_process(true); + set_physics_process(true); } } @@ -2764,7 +2764,7 @@ void Tree::_notification(int p_what) { drop_mode_flags = 0; scrolling = false; - set_fixed_process(false); + set_physics_process(false); update(); } if (p_what == NOTIFICATION_DRAG_BEGIN) { @@ -2772,23 +2772,23 @@ 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_fixed_process(true); + set_physics_process(true); } } - if (p_what == NOTIFICATION_FIXED_PROCESS) { + if (p_what == NOTIFICATION_PHYSICS_PROCESS) { if (drag_touching) { if (drag_touching_deaccel) { float pos = v_scroll->get_value(); - pos += drag_speed * get_fixed_process_delta_time(); + pos += drag_speed * get_physics_process_delta_time(); bool turnoff = false; if (pos < 0) { pos = 0; turnoff = true; - set_fixed_process(false); + set_physics_process(false); drag_touching = false; drag_touching_deaccel = false; } @@ -2800,7 +2800,7 @@ void Tree::_notification(int p_what) { v_scroll->set_value(pos); float sgn = drag_speed < 0 ? -1 : 1; float val = Math::abs(drag_speed); - val -= 1000 * get_fixed_process_delta_time(); + val -= 1000 * get_physics_process_delta_time(); if (val < 0) { turnoff = true; @@ -2808,7 +2808,7 @@ void Tree::_notification(int p_what) { drag_speed = sgn * val; if (turnoff) { - set_fixed_process(false); + set_physics_process(false); drag_touching = false; drag_touching_deaccel = false; } @@ -2833,7 +2833,7 @@ void Tree::_notification(int p_what) { } else { point.y = 0; } - point *= cache.scroll_speed * get_fixed_process_delta_time(); + point *= cache.scroll_speed * get_physics_process_delta_time(); point += get_scroll(); h_scroll->set_value(point.x); v_scroll->set_value(point.y); |
