From 483e7df52e3c8ed2df23e98ee2ecd7d497e56891 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Thu, 20 Apr 2023 16:11:16 +0300 Subject: [PATCH] ValueSlider arrow buttons now respect snap_by_default --- src/UI/Nodes/ValueSlider.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/UI/Nodes/ValueSlider.gd b/src/UI/Nodes/ValueSlider.gd index 21b64ce21..3e9e6ce23 100644 --- a/src/UI/Nodes/ValueSlider.gd +++ b/src/UI/Nodes/ValueSlider.gd @@ -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