mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
When using the mouse wheel over a slider, don't scroll in ScrollContainers
This commit is contained in:
parent
ad77d98f42
commit
7c1435e95f
|
@ -114,11 +114,13 @@ func _gui_input(event: InputEvent) -> void:
|
||||||
value += step if event.ctrl_pressed else snap_step
|
value += step if event.ctrl_pressed else snap_step
|
||||||
else:
|
else:
|
||||||
value += snap_step if event.ctrl_pressed else step
|
value += snap_step if event.ctrl_pressed else step
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
|
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
|
||||||
if snap_by_default:
|
if snap_by_default:
|
||||||
value -= step if event.ctrl_pressed else snap_step
|
value -= step if event.ctrl_pressed else snap_step
|
||||||
else:
|
else:
|
||||||
value -= snap_step if event.ctrl_pressed else step
|
value -= snap_step if event.ctrl_pressed else step
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
elif state == HELD:
|
elif state == HELD:
|
||||||
if event.is_action_released("left_mouse"):
|
if event.is_action_released("left_mouse"):
|
||||||
state = TYPING
|
state = TYPING
|
||||||
|
|
Loading…
Reference in a new issue