From ee16b0d55ce17aaea7b29bdbf8256b157049db0e Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Thu, 14 Jan 2021 21:21:19 +1030 Subject: [PATCH] Song select snap The slow tail popped out a bit with quantized text coords --- scripts/Menu.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/Menu.gd b/scripts/Menu.gd index 761ed12..bb3f4dc 100644 --- a/scripts/Menu.gd +++ b/scripts/Menu.gd @@ -114,6 +114,9 @@ func _process(delta): elif selected_song_delta < -0.5: selected_song_delta += 1.0 selected_song_vis -= 1 + if abs(diff) < 0.02: # Snap + selected_song_delta = 0.0 + selected_song_vis = selected_song var g_diff = selected_genre - (selected_genre_vis + selected_genre_delta) selected_genre_delta += ease_curve.interpolate(clamp(g_diff, -1, 1)) * 10 * delta @@ -123,6 +126,9 @@ func _process(delta): elif selected_genre_delta < -0.5: selected_genre_delta += 1.0 selected_genre_vis -= 1 + if abs(g_diff) < 0.02: # Snap + selected_genre_delta = 0.0 + selected_genre_vis = selected_genre menu_mode_prev_fade_timer = max(0.0, menu_mode_prev_fade_timer - delta) update()