aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/spin_box.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry2016-01-21 14:08:40 +0100
committerIgnacio Etcheverry2016-01-21 14:09:30 +0100
commitbd6f7a411c8b2a9e163e01d52a303333eac4fe78 (patch)
tree1cdc3af0770b11ead41ff139b260f9f898956381 /scene/gui/spin_box.cpp
parentd1bb868a193d33896df12d289341391ef6d4e8f3 (diff)
downloadgodot-bd6f7a411c8b2a9e163e01d52a303333eac4fe78.tar.gz
godot-bd6f7a411c8b2a9e163e01d52a303333eac4fe78.tar.zst
godot-bd6f7a411c8b2a9e163e01d52a303333eac4fe78.zip
Diffstat (limited to 'scene/gui/spin_box.cpp')
-rw-r--r--scene/gui/spin_box.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 38c61ded2..2b64d36a8 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -72,8 +72,7 @@ void SpinBox::_range_click_timeout() {
if (!drag.enabled && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
- int pos_y = Input::get_singleton()->get_mouse_pos().y-get_global_pos().y;
- bool up = pos_y < (get_size().height/2);
+ bool up = get_local_mouse_pos().y < (get_size().height/2);
set_val( get_val() + (up?get_step():-get_step()));
if (range_click_timer->is_one_shot()) {