Update Slider grabber position when using mouse wheel
This commit is contained in:
parent
86371b7298
commit
8a0e6e23a7
@ -47,8 +47,9 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
|
||||
return;
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid()) {
|
||||
|
||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
|
||||
if (updown_offset != -1 && mb->get_position().x > updown_offset) {
|
||||
@ -84,6 +85,11 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
|
||||
grabbing_spinner_attempt = false;
|
||||
}
|
||||
}
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_UP || mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
||||
|
||||
if (grabber->is_visible())
|
||||
call_deferred("update");
|
||||
}
|
||||
}
|
||||
|
||||
Ref<InputEventMouseMotion> mm = p_event;
|
||||
|
Loading…
Reference in New Issue
Block a user