Merge pull request #31442 from KoBeWi/grounded_grabber
Update Slider grabber position when using mouse wheel
This commit is contained in:
commit
d154e55f45
1 changed files with 31 additions and 25 deletions
|
@ -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 a new issue