From cae7c8a78562b579b75d72c039b41bf9469c39e4 Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Thu, 19 Jun 2025 17:06:43 +0700 Subject: [PATCH] fix: Properly check if the state is busy or not for back button in Freeplay --- source/funkin/ui/freeplay/FreeplayState.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 0fc24cd5e..5a301cd28 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -1407,10 +1407,16 @@ class FreeplayState extends MusicBeatSubState var allowPicoBulletsVibration:Bool = false; + var backTransitioning:Bool = false; + override function update(elapsed:Float):Void { super.update(elapsed); + #if FEATURE_TOUCH_CONTROLS + if (backButton != null && !backTransitioning) backButton.active = !busy; + #end + if (charSelectHint != null) { hintTimer += elapsed * 2; @@ -1936,6 +1942,7 @@ class FreeplayState extends MusicBeatSubState function goBack():Void { if (busy) return; + backTransitioning = true; busy = true; FlxTween.globalManager.clear(); FlxTimer.globalManager.clear();