diff --git a/source/funkin/FreeplayState.hx b/source/funkin/FreeplayState.hx index 012b6290a..42d29bfc9 100644 --- a/source/funkin/FreeplayState.hx +++ b/source/funkin/FreeplayState.hx @@ -494,7 +494,8 @@ class FreeplayState extends MusicBeatSubState for (i in 0...tempSongs.length) { - var funnyMenu:SongMenuItem = new SongMenuItem(FlxG.width, (i * 150) + 160, tempSongs[i].songName); + var funnyMenu:SongMenuItem = new SongMenuItem(FlxG.width, 0, tempSongs[i].songName); + funnyMenu.y = funnyMenu.intendedY(i + 1) + 10; funnyMenu.targetPos.x = funnyMenu.x; funnyMenu.ID = i; funnyMenu.alpha = 0.5; @@ -974,7 +975,7 @@ class FreeplayState extends MusicBeatSubState capsule.selected = false; - capsule.targetPos.y = ((index - curSelected) * ((capsule.height * capsule.realScaled) + 10)) + 160; + capsule.targetPos.y = capsule.intendedY(index - curSelected); capsule.targetPos.x = 270 + (60 * (Math.sin(index - curSelected))); // capsule.targetPos.x = 320 + (40 * (index - curSelected)); diff --git a/source/funkin/freeplayStuff/SongMenuItem.hx b/source/funkin/freeplayStuff/SongMenuItem.hx index cccd84c98..6476a1258 100644 --- a/source/funkin/freeplayStuff/SongMenuItem.hx +++ b/source/funkin/freeplayStuff/SongMenuItem.hx @@ -38,7 +38,7 @@ class SongMenuItem extends FlxSpriteGroup // capsule.animation add(capsule); - songText = new FlxText(capsule.width * 0.1, 40, 0, songTitle, Std.int(40 * realScaled)); + songText = new FlxText(capsule.width * 0.23, 40, 0, songTitle, Std.int(40 * realScaled)); songText.font = "5by7"; songText.color = 0xFF43C1EA; add(songText); @@ -114,6 +114,11 @@ class SongMenuItem extends FlxSpriteGroup super.update(elapsed); } + public function intendedY(index:Int):Float + { + return (index * ((height * realScaled) + 10)) + 160; + } + function set_selected(value:Bool):Bool { // trace(value);