touchpad scroll

This commit is contained in:
Nordup 2024-11-27 05:27:17 +04:00
parent 44f5bbeeb8
commit b5d8a6da5a
2 changed files with 16 additions and 7 deletions

View file

@ -18,8 +18,11 @@ func change_size() -> void:
func _input(event: InputEvent) -> void:
if not search.has_focus(): return
if (event is InputEventMouseButton
and event.button_index in [MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN]):
if event is InputEventMouseButton and event.button_index in \
[MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN]:
update_position = true
if event is InputEventPanGesture:
update_position = true