Skip to content

Commit

Permalink
Merge branch 'feature/skin/legacy-input-overlay' of https://github.co…
Browse files Browse the repository at this point in the history
…m/jkh675/osu into feature/skin/legacy-input-overlay
  • Loading branch information
normalid-awa committed Aug 6, 2024
2 parents 5f69b74 + 8619bbb commit 06aee1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
11 changes: 5 additions & 6 deletions osu.Game.Tests/Visual/Gameplay/TestSceneHUDOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using osu.Framework.Audio.Track;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
Expand Down Expand Up @@ -45,7 +44,7 @@ public partial class TestSceneHUDOverlay : OsuManualInputManagerTestScene

// best way to check without exposing.
private Drawable hideTarget => hudOverlay.ChildrenOfType<SkinComponentsContainer>().First();
private Drawable keyCounterFlow => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<FillFlowContainer<KeyCounter>>().Single();
private Drawable keyCounterContent => hudOverlay.ChildrenOfType<KeyCounterDisplay>().First().ChildrenOfType<Drawable>().Skip(1).First();

public TestSceneHUDOverlay()
{
Expand Down Expand Up @@ -79,7 +78,7 @@ public void TestShownByDefault()
AddAssert("showhud is set", () => hudOverlay.ShowHud.Value);

AddAssert("hidetarget is visible", () => hideTarget.Alpha, () => Is.GreaterThan(0));
AddAssert("key counter flow is visible", () => keyCounterFlow.IsPresent);
AddAssert("key counter flow is visible", () => keyCounterContent.IsPresent);
AddAssert("pause button is visible", () => hudOverlay.HoldToQuit.IsPresent);
}

Expand All @@ -104,7 +103,7 @@ public void TestHideExternally()
AddAssert("pause button is still visible", () => hudOverlay.HoldToQuit.IsPresent);

// Key counter flow container should not be affected by this, only the key counter display will be hidden as checked above.
AddAssert("key counter flow not affected", () => keyCounterFlow.IsPresent);
AddAssert("key counter flow not affected", () => keyCounterContent.IsPresent);
}

[Test]
Expand Down Expand Up @@ -150,11 +149,11 @@ public void TestChangeHUDVisibilityOnHiddenKeyCounter()

AddStep("set showhud false", () => hudOverlay.ShowHud.Value = false);
AddUntilStep("hidetarget is hidden", () => hideTarget.Alpha, () => Is.LessThanOrEqualTo(0));
AddUntilStep("key counters hidden", () => !keyCounterFlow.IsPresent);
AddUntilStep("key counters hidden", () => !keyCounterContent.IsPresent);

AddStep("set showhud true", () => hudOverlay.ShowHud.Value = true);
AddUntilStep("hidetarget is visible", () => hideTarget.Alpha, () => Is.GreaterThan(0));
AddUntilStep("key counters still hidden", () => !keyCounterFlow.IsPresent);
AddUntilStep("key counters still hidden", () => !keyCounterContent.IsPresent);
}

[Test]
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Screens/Play/ArgonKeyCounterDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public ArgonKeyCounterDisplay()
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Alpha = 0,
Spacing = new Vector2(2),
};
}
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Screens/Play/HUD/DefaultKeyCounterDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public DefaultKeyCounterDisplay()
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Alpha = 0,
};
}

Expand Down

0 comments on commit 06aee1b

Please sign in to comment.