1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:18:22 +08:00

Fix test failures

This commit is contained in:
Bartłomiej Dach 2024-09-05 09:45:37 +02:00
parent 7136483f85
commit b9ddac4201
No known key found for this signature in database
2 changed files with 9 additions and 11 deletions

View File

@ -61,27 +61,27 @@ namespace osu.Game.Rulesets.Osu.Tests
public void TestHitMarkers()
{
AddStep("enable hit markers", () => settings.ShowClickMarkers.Value = true);
AddAssert("hit markers visible", () => analysisContainer.HitMarkersVisible);
AddUntilStep("hit markers visible", () => analysisContainer.HitMarkersVisible);
AddStep("disable hit markers", () => settings.ShowClickMarkers.Value = false);
AddAssert("hit markers not visible", () => !analysisContainer.HitMarkersVisible);
AddUntilStep("hit markers not visible", () => !analysisContainer.HitMarkersVisible);
}
[Test]
public void TestAimMarker()
{
AddStep("enable aim markers", () => settings.ShowAimMarkers.Value = true);
AddAssert("aim markers visible", () => analysisContainer.AimMarkersVisible);
AddUntilStep("aim markers visible", () => analysisContainer.AimMarkersVisible);
AddStep("disable aim markers", () => settings.ShowAimMarkers.Value = false);
AddAssert("aim markers not visible", () => !analysisContainer.AimMarkersVisible);
AddUntilStep("aim markers not visible", () => !analysisContainer.AimMarkersVisible);
}
[Test]
public void TestAimLines()
{
AddStep("enable aim lines", () => settings.ShowCursorPath.Value = true);
AddAssert("aim lines visible", () => analysisContainer.AimLinesVisible);
AddUntilStep("aim lines visible", () => analysisContainer.AimLinesVisible);
AddStep("disable aim lines", () => settings.ShowCursorPath.Value = false);
AddAssert("aim lines not visible", () => !analysisContainer.AimLinesVisible);
AddUntilStep("aim lines not visible", () => !analysisContainer.AimLinesVisible);
}
private Replay fabricateReplay()

View File

@ -65,13 +65,11 @@ namespace osu.Game.Rulesets.Osu.UI
base.Update();
if (requireDisplay)
{
initialise();
if (ClickMarkers != null) ClickMarkers.Alpha = showClickMarkers.Value ? 1 : 0;
if (FrameMarkers != null) FrameMarkers.Alpha = showFrameMarkers.Value ? 1 : 0;
if (CursorPath != null) CursorPath.Alpha = showCursorPath.Value ? 1 : 0;
}
if (ClickMarkers != null) ClickMarkers.Alpha = showClickMarkers.Value ? 1 : 0;
if (FrameMarkers != null) FrameMarkers.Alpha = showFrameMarkers.Value ? 1 : 0;
if (CursorPath != null) CursorPath.Alpha = showCursorPath.Value ? 1 : 0;
}
private void initialise()