1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 17:03:02 +08:00

Add HasQuit gameplay state

This commit is contained in:
Dan Balasescu 2022-01-26 02:02:31 +09:00
parent 781cb9f18d
commit 38e075c522
2 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,11 @@ namespace osu.Game.Screens.Play
/// </summary> /// </summary>
public bool HasFailed { get; set; } public bool HasFailed { get; set; }
/// <summary>
/// Whether the user quit gameplay without either having either passed or failed.
/// </summary>
public bool HasQuit { get; set; }
/// <summary> /// <summary>
/// A bindable tracking the last judgement result applied to any hit object. /// A bindable tracking the last judgement result applied to any hit object.
/// </summary> /// </summary>

View File

@ -983,6 +983,9 @@ namespace osu.Game.Screens.Play
public override bool OnExiting(IScreen next) public override bool OnExiting(IScreen next)
{ {
if (!GameplayState.HasPassed && !GameplayState.HasFailed)
GameplayState.HasQuit = true;
screenSuspension?.RemoveAndDisposeImmediately(); screenSuspension?.RemoveAndDisposeImmediately();
failAnimationLayer?.RemoveFilters(); failAnimationLayer?.RemoveFilters();