mirror of
https://github.com/osukey/osukey.git
synced 2025-06-19 10:17:56 +09:00
Merge branch 'master' into one-hit-screen
This commit is contained in:
commit
6063e7a69f
@ -137,6 +137,22 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
exitAndConfirm();
|
exitAndConfirm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestExitViaHoldToExit()
|
||||||
|
{
|
||||||
|
AddStep("exit", () =>
|
||||||
|
{
|
||||||
|
InputManager.MoveMouseTo(Player.HUDOverlay.HoldToQuit.First(c => c is HoldToConfirmContainer));
|
||||||
|
InputManager.PressButton(MouseButton.Left);
|
||||||
|
});
|
||||||
|
|
||||||
|
confirmPaused();
|
||||||
|
|
||||||
|
AddStep("release", () => InputManager.ReleaseButton(MouseButton.Left));
|
||||||
|
|
||||||
|
exitAndConfirm();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestExitFromPause()
|
public void TestExitFromPause()
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!this.IsCurrentScreen()) return;
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
fadeOut(true);
|
fadeOut(true);
|
||||||
performUserRequestedExit();
|
performImmediateExit();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, }
|
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, }
|
||||||
@ -251,15 +251,20 @@ namespace osu.Game.Screens.Play
|
|||||||
return working;
|
return working;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performUserRequestedExit()
|
private void performImmediateExit()
|
||||||
{
|
{
|
||||||
if (!this.IsCurrentScreen()) return;
|
|
||||||
|
|
||||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
||||||
onCompletionEvent = null;
|
onCompletionEvent = null;
|
||||||
|
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
|
|
||||||
|
performUserRequestedExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performUserRequestedExit()
|
||||||
|
{
|
||||||
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
this.Exit();
|
this.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user