Skip to content

Commit

Permalink
Add zoom with mouse wheel in import window (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayu-sw authored Jun 11, 2024
1 parent 4617aa5 commit 0b14027
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ func _input(event: InputEvent):
elif event and event is InputEventPanGesture:
pan(event.delta)
elif event and event is InputEventMouseButton:
if event.is_pressed():
if event.button_index == MOUSE_BUTTON_WHEEL_UP or event.button_index == MOUSE_BUTTON_WHEEL_LEFT:
zoom(0.9)
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN or event.button_index == MOUSE_BUTTON_WHEEL_RIGHT:
zoom(1.1)
elif event.is_pressed():
hold = true
pressed_moused_position = to_local(get_global_mouse_position())
elif event.is_released():
Expand Down

0 comments on commit 0b14027

Please sign in to comment.