From 7c1435e95fa6896cd40601545d5b4cfbb0a13ab0 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:32:01 +0200 Subject: [PATCH] When using the mouse wheel over a slider, don't scroll in ScrollContainers --- src/UI/Nodes/ValueSlider.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/UI/Nodes/ValueSlider.gd b/src/UI/Nodes/ValueSlider.gd index 8d9a8cbad..b990b19cf 100644 --- a/src/UI/Nodes/ValueSlider.gd +++ b/src/UI/Nodes/ValueSlider.gd @@ -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