Fixed issues with slider focus and scroll input
This commit is contained in:
parent
78e223569b
commit
707cf278a5
1 changed files with 2 additions and 0 deletions
|
@ -73,8 +73,10 @@ void Slider::_gui_input(Ref<InputEvent> p_event) {
|
||||||
}
|
}
|
||||||
} else if (scrollable) {
|
} else if (scrollable) {
|
||||||
if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_UP) {
|
if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_UP) {
|
||||||
|
grab_focus();
|
||||||
set_value(get_value() + get_step());
|
set_value(get_value() + get_step());
|
||||||
} else if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
} else if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
||||||
|
grab_focus();
|
||||||
set_value(get_value() - get_step());
|
set_value(get_value() - get_step());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue