1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

ValueSlider arrow buttons now respect snap_by_default

This commit is contained in:
Emmanouil Papadeas 2023-04-20 16:11:16 +03:00
parent ec2dcae8f7
commit 483e7df52e

View file

@ -277,7 +277,10 @@ func _on_Value_button_down(direction: int) -> void:
if not editable:
return
# Direction is either 1 or -1
value += (snap_step if Input.is_action_pressed("ctrl") else step) * direction
if snap_by_default:
value += (step if Input.is_action_pressed("ctrl") else snap_step) * direction
else:
value += (snap_step if Input.is_action_pressed("ctrl") else step) * direction
arrow_is_held = direction
_timer.wait_time = echo_arrow_time * 8 # 0.6 with the default value
_timer.one_shot = true