Fix item list scroll speed.
Remove the extra `set_val` action after the proper one, so the right scroll value won’t get overrided any more.
This commit is contained in:
parent
29c7118f32
commit
064dce7a4c
1 changed files with 0 additions and 2 deletions
|
@ -521,13 +521,11 @@ void ItemList::_input_event(const InputEvent &p_event) {
|
|||
|
||||
scroll_bar->set_val(scroll_bar->get_val() - scroll_bar->get_page() * p_event.mouse_button.factor / 8);
|
||||
|
||||
scroll_bar->set_val(scroll_bar->get_val() - scroll_bar->get_page() / 8);
|
||||
}
|
||||
if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_WHEEL_DOWN && p_event.mouse_button.pressed) {
|
||||
|
||||
scroll_bar->set_val(scroll_bar->get_val() + scroll_bar->get_page() * p_event.mouse_button.factor / 8);
|
||||
|
||||
scroll_bar->set_val(scroll_bar->get_val() + scroll_bar->get_page() / 8);
|
||||
}
|
||||
|
||||
if (p_event.is_pressed() && items.size() > 0) {
|
||||
|
|
Loading…
Reference in a new issue