From 81f8338c99bc082dc9f1d7ebff99affc44151a9b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 29 Apr 2024 03:49:28 -0400 Subject: [PATCH] sets the selected track as first one in group when swapping sorts on freeplay --- source/funkin/ui/freeplay/FreeplayState.hx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index b16cbe63a..bd558f747 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -456,6 +456,14 @@ class FreeplayState extends MusicBeatSubState default: generateSongList({filterType: REGEXP, filterData: str}, true); } + + // We want to land on the first song of the group, rather than random song when changing letter sorts + // that is, only if there's more than one song in the group! + if (grpCapsules.members.length > 0) + { + curSelected = 1; + changeSelection(); + } }; exitMovers.set([fp, txtCompletion, fnfHighscoreSpr],