mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:52:54 +08:00
Fix mode cycling and add test coverage
This commit is contained in:
parent
0c333e5c08
commit
8d53ed64a3
@ -30,6 +30,12 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
AddStep("set visual mode to circles", () => latencyCertifier.VisualMode.Value = LatencyVisualMode.CircleGameplay);
|
AddStep("set visual mode to circles", () => latencyCertifier.VisualMode.Value = LatencyVisualMode.CircleGameplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestCycleVisualModes()
|
||||||
|
{
|
||||||
|
AddRepeatStep("cycle mode", () => InputManager.Key(Key.Space), 6);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestCertification()
|
public void TestCertification()
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,8 @@ namespace osu.Game.Screens.Utility
|
|||||||
switch (e.Key)
|
switch (e.Key)
|
||||||
{
|
{
|
||||||
case Key.Space:
|
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;
|
return true;
|
||||||
|
|
||||||
case Key.Tab:
|
case Key.Tab:
|
||||||
|
Loading…
Reference in New Issue
Block a user