1
0
Fork 0

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 064dce7a4c)
This commit is contained in:
Sean Bohan 2017-05-26 17:25:44 +08:00 committed by Rémi Verschelde
parent d8381ef28f
commit cba62864c8
1 changed files with 0 additions and 4 deletions

View File

@ -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) {