diff --git a/source/funkin/mobile/ui/FunkinBackButton.hx b/source/funkin/mobile/ui/FunkinBackButton.hx index 01ebf2d7f..dde206786 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) { @@ -93,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}); } @@ -105,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(); + } } 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