Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Sep 5, 2024
1 parent 7136483 commit b9ddac4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions osu.Game.Rulesets.Osu.Tests/TestSceneOsuAnalysisContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,27 @@ public void TestEverythingOn()
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()
Expand Down
8 changes: 3 additions & 5 deletions osu.Game.Rulesets.Osu/UI/ReplayAnalysisOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ protected override void Update()
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()
Expand Down

0 comments on commit b9ddac4

Please sign in to comment.