Merge branch 'master' into combobreak

This commit is contained in:
welsar55
2019-06-29 11:55:10 -05:00
committed by GitHub
255 changed files with 11262 additions and 2484 deletions

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Play
{
public class Player : ScreenWithBeatmapBackground
{
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
public override bool AllowBackButton => false; // handled by HoldForMenuButton
protected override UserActivity InitialActivity => new UserActivity.SoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
@ -181,6 +181,16 @@ namespace osu.Game.Screens.Play
Restart();
},
},
new HotkeyExitOverlay
{
Action = () =>
{
if (!this.IsCurrentScreen()) return;
fadeOut(true);
performImmediateExit();
},
},
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, }
};
@ -245,6 +255,16 @@ namespace osu.Game.Screens.Play
return working;
}
private void performImmediateExit()
{
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
onCompletionEvent = null;
ValidForResume = false;
performUserRequestedExit();
}
private void performUserRequestedExit()
{
if (!this.IsCurrentScreen()) return;