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

Fix mode cycling and add test coverage

This commit is contained in:
Dean Herbert 2022-06-11 21:36:41 +09:00
parent 0c333e5c08
commit 8d53ed64a3
2 changed files with 8 additions and 1 deletions

View File

@ -30,6 +30,12 @@ namespace osu.Game.Tests.Visual.Settings
AddStep("set visual mode to circles", () => latencyCertifier.VisualMode.Value = LatencyVisualMode.CircleGameplay);
}
[Test]
public void TestCycleVisualModes()
{
AddRepeatStep("cycle mode", () => InputManager.Key(Key.Space), 6);
}
[Test]
public void TestCertification()
{

View File

@ -241,7 +241,8 @@ namespace osu.Game.Screens.Utility
switch (e.Key)
{
case Key.Space:
VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % 3);
int availableModes = Enum.GetValues(typeof(LatencyVisualMode)).Length;
VisualMode.Value = (LatencyVisualMode)(((int)VisualMode.Value + 1) % availableModes);
return true;
case Key.Tab: