mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
added visual tests
added small commenting added xmldoc for CancelResume();
This commit is contained in:
parent
f8354eefc4
commit
9e2e87c8d1
@ -69,6 +69,24 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
confirmClockRunning(true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPauseWithResumeOverlay()
|
||||
{
|
||||
AddStep("move cursor to center", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.Centre));
|
||||
AddUntilStep("wait for hitobjects", () => Player.ScoreProcessor.Health.Value < 1);
|
||||
|
||||
pauseAndConfirm();
|
||||
|
||||
resume();
|
||||
confirmClockRunning(false);
|
||||
confirmPauseOverlayShown(false);
|
||||
|
||||
pauseAndConfirm();
|
||||
|
||||
AddUntilStep("resume overlay is not active", () => Player.DrawableRuleset.ResumeOverlay.State.Value == Visibility.Hidden);
|
||||
confirmPaused();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResumeWithResumeOverlaySkipped()
|
||||
{
|
||||
|
@ -239,8 +239,10 @@ namespace osu.Game.Rulesets.UI
|
||||
continueResume();
|
||||
}
|
||||
|
||||
|
||||
public override void CancelResume()
|
||||
{
|
||||
// called if the user pauses while the resume overlay is open
|
||||
ResumeOverlay?.Hide();
|
||||
}
|
||||
|
||||
@ -458,6 +460,9 @@ namespace osu.Game.Rulesets.UI
|
||||
/// <param name="continueResume">The action to run when resuming is to be completed.</param>
|
||||
public abstract void RequestResume(Action continueResume);
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the user requests to pause while the resume overlay is active.
|
||||
/// </summary>
|
||||
public abstract void CancelResume();
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user