Fix exit scenarios

This commit is contained in:
Dean Herbert
2019-09-19 20:17:58 +09:00
parent ead3ee3b41
commit 50d4206c45
5 changed files with 41 additions and 24 deletions

View File

@ -9,6 +9,10 @@ namespace osu.Game.Screens.Menu
{
public class ExitConfirmOverlay : HoldToConfirmOverlay, IKeyBindingHandler<GlobalAction>
{
protected override bool AllowMultipleFires => true;
public void Abort() => AbortConfirm();
public bool OnPressed(GlobalAction action)
{
if (action == GlobalAction.Back)
@ -24,7 +28,8 @@ namespace osu.Game.Screens.Menu
{
if (action == GlobalAction.Back)
{
AbortConfirm();
if (!Fired)
AbortConfirm();
return true;
}