Merge pull request #1214 from FunkinCrew/back-button-tweaks
Back Button fixes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class OptionsMenu extends Page<OptionsMenuPageName>
|
||||
#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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user