Skip to content

Commit

Permalink
When using the mouse wheel over a slider, don't scroll in ScrollConta…
Browse files Browse the repository at this point in the history
…iners
  • Loading branch information
OverloadedOrama committed Nov 13, 2024
1 parent ad77d98 commit 7c1435e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/UI/Nodes/ValueSlider.gd
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ func _gui_input(event: InputEvent) -> void:
value += step if event.ctrl_pressed else snap_step
else:
value += snap_step if event.ctrl_pressed else step
get_viewport().set_input_as_handled()
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
if snap_by_default:
value -= step if event.ctrl_pressed else snap_step
else:
value -= snap_step if event.ctrl_pressed else step
get_viewport().set_input_as_handled()
elif state == HELD:
if event.is_action_released("left_mouse"):
state = TYPING
Expand Down

0 comments on commit 7c1435e

Please sign in to comment.