diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 2 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 5a6ac7c0d2..af51287ca1 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3172,7 +3172,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) { if (drag_touching && !drag_touching_deaccel) { drag_accum -= mm->get_relative().y; v_scroll->set_value(drag_from + drag_accum); - drag_speed = -mm->get_speed().y; + drag_speed = -mm->get_velocity().y; } } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 34845d5875..8b79f9f134 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1700,13 +1700,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (over) { Transform2D localizer = over->get_global_transform_with_canvas().affine_inverse(); Size2 pos = localizer.xform(mpos); - Vector2 speed = localizer.basis_xform(mm->get_speed()); + Vector2 velocity = localizer.basis_xform(mm->get_velocity()); Vector2 rel = localizer.basis_xform(mm->get_relative()); mm = mm->xformed_by(Transform2D()); // Make a copy. mm->set_global_position(mpos); - mm->set_speed(speed); + mm->set_velocity(velocity); mm->set_relative(rel); if (mm->get_button_mask() == MouseButton::NONE) { @@ -1956,12 +1956,12 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (over->can_process()) { Transform2D localizer = over->get_global_transform_with_canvas().affine_inverse(); Size2 pos = localizer.xform(drag_event->get_position()); - Vector2 speed = localizer.basis_xform(drag_event->get_speed()); + Vector2 velocity = localizer.basis_xform(drag_event->get_velocity()); Vector2 rel = localizer.basis_xform(drag_event->get_relative()); drag_event = drag_event->xformed_by(Transform2D()); // Make a copy. - drag_event->set_speed(speed); + drag_event->set_velocity(velocity); drag_event->set_relative(rel); drag_event->set_position(pos); |