1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 06:21:22 +08:00

Fix failing test

This commit is contained in:
Dean Herbert
2025-06-16 19:39:37 +09:00
Unverified
parent c888431201
commit 13df477fc0
2 changed files with 4 additions and 21 deletions
@@ -67,11 +67,11 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("show", () => overlay.Show());
AddUntilStep("wait for content dim", () => overlay.BackgroundDimLayer.Alpha > 0);
AddUntilStep("wait for content dim", () => overlay.Alpha > 0);
AddStep("hide", () => overlay.Hide());
AddUntilStep("wait for content restore", () => Precision.AlmostEquals(overlay.BackgroundDimLayer.Alpha, 0));
AddUntilStep("wait for content restore", () => Precision.AlmostEquals(overlay.Alpha, 0));
}
[Test]
@@ -90,8 +90,6 @@ namespace osu.Game.Tests.Visual.UserInterface
private partial class TestLoadingLayer : LoadingLayer
{
public new Box BackgroundDimLayer => base.BackgroundDimLayer;
public TestLoadingLayer(bool dimBackground = false, bool withBox = true)
: base(dimBackground, withBox)
{
@@ -22,9 +22,6 @@ namespace osu.Game.Graphics.UserInterface
{
private readonly bool blockInput;
[CanBeNull]
protected Box BackgroundDimLayer { get; }
/// <summary>
/// Construct a new loading spinner.
/// </summary>
@@ -42,11 +39,11 @@ namespace osu.Game.Graphics.UserInterface
if (dimBackground)
{
AddInternal(BackgroundDimLayer = new Box
AddInternal(new Box
{
Depth = float.MaxValue,
Colour = Color4.Black,
Alpha = 0,
Alpha = 0.5f,
RelativeSizeAxes = Axes.Both,
});
}
@@ -74,18 +71,6 @@ namespace osu.Game.Graphics.UserInterface
return true;
}
protected override void PopIn()
{
BackgroundDimLayer?.FadeTo(0.5f, TRANSITION_DURATION * 2, Easing.OutQuint);
base.PopIn();
}
protected override void PopOut()
{
BackgroundDimLayer?.FadeOut(TRANSITION_DURATION, Easing.OutQuint);
base.PopOut();
}
protected override void Update()
{
base.Update();