mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +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);
|
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]
|
[Test]
|
||||||
public void TestResumeWithResumeOverlaySkipped()
|
public void TestResumeWithResumeOverlaySkipped()
|
||||||
{
|
{
|
||||||
|
@ -239,8 +239,10 @@ namespace osu.Game.Rulesets.UI
|
|||||||
continueResume();
|
continueResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void CancelResume()
|
public override void CancelResume()
|
||||||
{
|
{
|
||||||
|
// called if the user pauses while the resume overlay is open
|
||||||
ResumeOverlay?.Hide();
|
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>
|
/// <param name="continueResume">The action to run when resuming is to be completed.</param>
|
||||||
public abstract void RequestResume(Action continueResume);
|
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();
|
public abstract void CancelResume();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user