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. (cherry picked from commit 064dce7a4c4bdca13b5358ccc9f9829f0e1068fb)
This commit is contained in:
parent
d8381ef28f
commit
cba62864c8
1 changed files with 0 additions and 4 deletions
|
|
@ -520,14 +520,10 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
|
|||
if (mb.is_valid() && mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
|
||||
|
||||
scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() * mb->get_factor() / 8);
|
||||
|
||||
scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() / 8);
|
||||
}
|
||||
if (mb.is_valid() && mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
|
||||
|
||||
scroll_bar->set_value(scroll_bar->get_value() + scroll_bar->get_page() * mb->get_factor() / 8);
|
||||
|
||||
scroll_bar->set_value(scroll_bar->get_value() + scroll_bar->get_page() / 8);
|
||||
}
|
||||
|
||||
if (p_event->is_pressed() && items.size() > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue