feat: mouse wheel on menu now scrolls by 3 items at a time

This commit is contained in:
tomasklaen
2022-09-14 16:49:57 +02:00
parent 85b49002a8
commit 2f297c2834

View File

@@ -1941,13 +1941,13 @@ function Menu:on_global_mouse_move()
end
function Menu:on_wheel_up()
self:scroll_to(self.current.scroll_y - self.scroll_step)
self:scroll_to(self.current.scroll_y - self.scroll_step * 3)
self:on_global_mouse_move() -- selects item below cursor
request_render()
end
function Menu:on_wheel_down()
self:scroll_to(self.current.scroll_y + self.scroll_step)
self:scroll_to(self.current.scroll_y + self.scroll_step * 3)
self:on_global_mouse_move() -- selects item below cursor
request_render()
end