diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2016-01-22 19:17:24 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-22 19:17:24 -0300 |
| commit | 84d7a559e5198478b1ae23d00dbd966461aadfe7 (patch) | |
| tree | 8480de1917859c12d8c0b081c87190ae07d65244 /scene/gui/spin_box.cpp | |
| parent | 9d571d8eacb07e1b96de049feca976b3309cd21d (diff) | |
| parent | ed3c73408b3b0ddf234ddcc5349fe85831e3ebba (diff) | |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'scene/gui/spin_box.cpp')
| -rw-r--r-- | scene/gui/spin_box.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 38c61ded2c..2b64d36a81 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()) { |