1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Add circle gameplay test coverage

This commit is contained in:
Dean Herbert 2022-06-10 18:18:18 +09:00
parent c657ef2722
commit d46739ff0b
2 changed files with 10 additions and 4 deletions

View File

@ -24,6 +24,12 @@ namespace osu.Game.Tests.Visual.Settings
AddUntilStep("wait for load", () => latencyCertifier.IsLoaded); AddUntilStep("wait for load", () => latencyCertifier.IsLoaded);
} }
[Test]
public void TestCircleGameplay()
{
AddStep("set visual mode to circles", () => latencyCertifier.VisualMode.Value = LatencyVisualMode.CircleGameplay);
}
[Test] [Test]
public void TestCertification() public void TestCertification()
{ {

View File

@ -63,7 +63,7 @@ namespace osu.Game.Screens.Utility
[Resolved] [Resolved]
private FrameworkConfigManager config { get; set; } = null!; private FrameworkConfigManager config { get; set; } = null!;
private readonly Bindable<LatencyVisualMode> visualMode = new Bindable<LatencyVisualMode>(); public readonly Bindable<LatencyVisualMode> VisualMode = new Bindable<LatencyVisualMode>();
private const int rounds_to_complete = 5; private const int rounds_to_complete = 5;
@ -187,7 +187,7 @@ Do whatever you need to try and perceive the difference in latency, then choose
switch (e.Key) switch (e.Key)
{ {
case Key.Space: case Key.Space:
visualMode.Value = (LatencyVisualMode)(((int)visualMode.Value + 1) % 3); VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % 3);
return true; return true;
case Key.Tab: case Key.Tab:
@ -396,14 +396,14 @@ Do whatever you need to try and perceive the difference in latency, then choose
new LatencyArea(Key.Number1, betterSide == 1 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null) new LatencyArea(Key.Number1, betterSide == 1 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null)
{ {
Width = 0.5f, Width = 0.5f,
VisualMode = { BindTarget = visualMode }, VisualMode = { BindTarget = VisualMode },
IsActiveArea = { Value = true }, IsActiveArea = { Value = true },
ReportUserBest = () => recordResult(betterSide == 0), ReportUserBest = () => recordResult(betterSide == 0),
}, },
new LatencyArea(Key.Number2, betterSide == 0 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null) new LatencyArea(Key.Number2, betterSide == 0 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null)
{ {
Width = 0.5f, Width = 0.5f,
VisualMode = { BindTarget = visualMode }, VisualMode = { BindTarget = VisualMode },
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
ReportUserBest = () => recordResult(betterSide == 1) ReportUserBest = () => recordResult(betterSide == 1)