Skip to content

Commit f349eed

Browse files
fix: Re-add backbutton transitioning
1 parent ee2f3c3 commit f349eed

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

source/funkin/ui/freeplay/FreeplayState.hx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,8 @@ class FreeplayState extends MusicBeatSubState
14541454
fadeDots(false);
14551455

14561456
#if FEATURE_TOUCH_CONTROLS
1457-
FlxTween.tween(backButton, {alpha: 0.0001}, 0.4, {ease: FlxEase.quadOut});
1457+
backTransitioning = true;
1458+
FlxTween.tween(backButton, {alpha: 0}, 0.4, {ease: FlxEase.quadOut});
14581459
#end
14591460

14601461
funnyCam.filtersEnabled = true;
@@ -1569,7 +1570,7 @@ class FreeplayState extends MusicBeatSubState
15691570
backButton.animation.play("idle");
15701571
backButton.alpha = backButton.restingOpacity;
15711572
}
1572-
backButton.active = controls.active;
1573+
backButton.enabled = controls.active;
15731574
}
15741575
#end
15751576

@@ -2127,7 +2128,7 @@ class FreeplayState extends MusicBeatSubState
21272128

21282129
#if FEATURE_TOUCH_CONTROLS
21292130
FlxTween.tween(backButton, {x: FlxG.width + 300}, 0.45, {ease: FlxEase.expoIn});
2130-
FlxTween.tween(backButton, {alpha: 0.0001}, 0.3, {ease: FlxEase.quadOut, startDelay: 0.15});
2131+
FlxTween.tween(backButton, {alpha: 0}, 0.3, {ease: FlxEase.quadOut, startDelay: 0.15});
21312132
#end
21322133

21332134
for (caps in grpCapsules.members)
@@ -2456,7 +2457,7 @@ class FreeplayState extends MusicBeatSubState
24562457
/**
24572458
* Called when hitting ENTER on an instrumental choice for random capsule
24582459
*/
2459-
function capsuleOnConfirmRandom(availableSongCapsules:Array<SongMenuItem>, instChoice:String):Void
2460+
function capsuleOnConfirmRandom(availableSongCapsules:Array<SongMenuItem>, instChoice:String):Void
24602461
{
24612462
cleanupCapsuleOptionsMenu();
24622463
controls.active = false;
@@ -2680,6 +2681,13 @@ class FreeplayState extends MusicBeatSubState
26802681
new FlxTimer().start(styleData?.getStartDelay(), function(tmr:FlxTimer) {
26812682
FunkinSound.emptyPartialQueue();
26822683

2684+
#if FEATURE_TOUCH_CONTROLS
2685+
if (backButton != null)
2686+
{
2687+
backTransitioning = true;
2688+
FlxTween.tween(backButton, {alpha: 0}, 0.2, {ease: FlxEase.quadOut});
2689+
}
2690+
#end
26832691
funnyCam.fade(FlxColor.BLACK, 0.2, false, function() {
26842692
Paths.setCurrentLevel(cap?.freeplayData?.levelId);
26852693
LoadingState.loadPlayState(

0 commit comments

Comments
 (0)