From 82b550c6b34b7a836a3bb9da4d31c9e6264c5252 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 18 Jul 2018 15:35:01 -0300 Subject: [PATCH] Fix spin slider, was not registering drag properly --- editor/editor_spin_slider.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index c7a33de3f1b..33f7d3c5c41 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -90,10 +90,12 @@ void EditorSpinSlider::_gui_input(const Ref &p_event) { } grabbing_spinner_dist_cache += diff_x; - if (!grabbing_spinner && ABS(grabbing_spinner_dist_cache) > 4) { + if (!grabbing_spinner && ABS(grabbing_spinner_dist_cache) > 4 * EDSCALE) { Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED); grabbing_spinner = true; - } else { + } + + if (grabbing_spinner) { if (mm->get_control() || updown_offset != -1) { set_value(Math::round(get_value())); if (ABS(grabbing_spinner_dist_cache) > 6) {