From d46739ff0bc53f5dc2bceaa3894c3d9509ab99e0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Jun 2022 18:18:18 +0900 Subject: [PATCH] Add circle gameplay test coverage --- .../Visual/Settings/TestSceneLatencyCertifierScreen.cs | 6 ++++++ osu.Game/Screens/Utility/LatencyCertifierScreen.cs | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Settings/TestSceneLatencyCertifierScreen.cs b/osu.Game.Tests/Visual/Settings/TestSceneLatencyCertifierScreen.cs index af6681e9cf..079796df2e 100644 --- a/osu.Game.Tests/Visual/Settings/TestSceneLatencyCertifierScreen.cs +++ b/osu.Game.Tests/Visual/Settings/TestSceneLatencyCertifierScreen.cs @@ -24,6 +24,12 @@ public override void SetUpSteps() AddUntilStep("wait for load", () => latencyCertifier.IsLoaded); } + [Test] + public void TestCircleGameplay() + { + AddStep("set visual mode to circles", () => latencyCertifier.VisualMode.Value = LatencyVisualMode.CircleGameplay); + } + [Test] public void TestCertification() { diff --git a/osu.Game/Screens/Utility/LatencyCertifierScreen.cs b/osu.Game/Screens/Utility/LatencyCertifierScreen.cs index 00821ab773..658e0537c6 100644 --- a/osu.Game/Screens/Utility/LatencyCertifierScreen.cs +++ b/osu.Game/Screens/Utility/LatencyCertifierScreen.cs @@ -63,7 +63,7 @@ public class LatencyCertifierScreen : OsuScreen [Resolved] private FrameworkConfigManager config { get; set; } = null!; - private readonly Bindable visualMode = new Bindable(); + public readonly Bindable VisualMode = new Bindable(); private const int rounds_to_complete = 5; @@ -187,7 +187,7 @@ protected override bool OnKeyDown(KeyDownEvent e) switch (e.Key) { case Key.Space: - visualMode.Value = (LatencyVisualMode)(((int)visualMode.Value + 1) % 3); + VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % 3); return true; case Key.Tab: @@ -396,14 +396,14 @@ private void loadNextRound() new LatencyArea(Key.Number1, betterSide == 1 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null) { Width = 0.5f, - VisualMode = { BindTarget = visualMode }, + VisualMode = { BindTarget = VisualMode }, IsActiveArea = { Value = true }, ReportUserBest = () => recordResult(betterSide == 0), }, new LatencyArea(Key.Number2, betterSide == 0 ? mapDifficultyToTargetFrameRate(DifficultyLevel) : (int?)null) { Width = 0.5f, - VisualMode = { BindTarget = visualMode }, + VisualMode = { BindTarget = VisualMode }, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, ReportUserBest = () => recordResult(betterSide == 1)