From 1b1d0a978df44019da1cc6b1c204c236881deb03 Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:45:19 +0700 Subject: [PATCH 1/3] Play cancelMenu when backing out --- source/funkin/mobile/ui/FunkinBackButton.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/source/funkin/mobile/ui/FunkinBackButton.hx b/source/funkin/mobile/ui/FunkinBackButton.hx index 01ebf2d7f..14d55656c 100644 --- a/source/funkin/mobile/ui/FunkinBackButton.hx +++ b/source/funkin/mobile/ui/FunkinBackButton.hx @@ -76,6 +76,7 @@ class FunkinBackButton extends FunkinButton FlxTween.cancelTweensOf(this); HapticUtil.vibrate(0, 0.05, 0.5); animation.play('confirm'); + funkin.audio.FunkinSound.playOnce(Paths.sound('cancelMenu')); if (!instant) { From ea0e4ee56d0ce5b07a15d63ad17ea0e71b5e8860 Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:45:36 +0700 Subject: [PATCH 2/3] fix: Remove all callbacks when destroyed --- source/funkin/mobile/ui/FunkinBackButton.hx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/funkin/mobile/ui/FunkinBackButton.hx b/source/funkin/mobile/ui/FunkinBackButton.hx index 14d55656c..dde206786 100644 --- a/source/funkin/mobile/ui/FunkinBackButton.hx +++ b/source/funkin/mobile/ui/FunkinBackButton.hx @@ -94,6 +94,7 @@ class FunkinBackButton extends FunkinButton { FlxTween.cancelTweensOf(this); HapticUtil.vibrate(0, 0.01, 0.2); + animation.play('idle'); FlxTween.tween(this, {alpha: restingOpacity}, 0.5, {ease: FlxEase.expoOut}); } @@ -106,4 +107,11 @@ class FunkinBackButton extends FunkinButton if (FlxG.android.justReleased.BACK) onDown.dispatch(); #end } + + override function destroy():Void + { + super.destroy(); + onConfirmEnd.removeAll(); + if (animation != null && animation.onFinish != null) animation.onFinish.removeAll(); + } } From 1b7dc5f1ace2d8fe8193a839f5b9398b54c39dab Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Fri, 13 Jun 2025 09:45:55 +0700 Subject: [PATCH 3/3] fix: Make backing out of options instant --- source/funkin/ui/options/OptionsState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/ui/options/OptionsState.hx b/source/funkin/ui/options/OptionsState.hx index bdeb678cd..029abeb9d 100644 --- a/source/funkin/ui/options/OptionsState.hx +++ b/source/funkin/ui/options/OptionsState.hx @@ -172,7 +172,7 @@ class OptionsMenu extends Page #if NO_FEATURE_TOUCH_CONTROLS createItem("EXIT", exit); #else - var backButton:FunkinBackButton = new FunkinBackButton(FlxG.width - 230, FlxG.height - 200, exit, 1.0); + var backButton:FunkinBackButton = new FunkinBackButton(FlxG.width - 230, FlxG.height - 200, exit, 1.0, true); add(backButton); #end