mirror of
https://github.com/ppy/osu
synced 2025-03-06 11:28:12 +00:00
Merge branch 'centralise-loading-animations' into use-loading-inbeatmap-listing
This commit is contained in:
commit
0b589eff45
@ -21,12 +21,14 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(LoadingSpinner) };
|
||||
|
||||
private Container content;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp() => Schedule(() =>
|
||||
{
|
||||
Children = new[]
|
||||
{
|
||||
new Container
|
||||
content = new Container
|
||||
{
|
||||
Size = new Vector2(300),
|
||||
Anchor = Anchor.Centre,
|
||||
@ -60,7 +62,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void ShowHide()
|
||||
public void TestShowHide()
|
||||
{
|
||||
AddAssert("not visible", () => !overlay.IsPresent);
|
||||
|
||||
@ -74,7 +76,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ContentRestoreOnDispose()
|
||||
public void TestContentRestoreOnDispose()
|
||||
{
|
||||
AddAssert("not visible", () => !overlay.IsPresent);
|
||||
|
||||
@ -82,9 +84,23 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddUntilStep("wait for content dim", () => dimContent.Colour != Color4.White);
|
||||
|
||||
AddStep("hide", () => overlay.Expire());
|
||||
AddStep("expire", () => overlay.Expire());
|
||||
|
||||
AddUntilStep("wait for content restore", () => dimContent.Colour == Color4.White);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLargeArea()
|
||||
{
|
||||
AddStep("show", () =>
|
||||
{
|
||||
content.RelativeSizeAxes = Axes.Both;
|
||||
content.Size = new Vector2(1);
|
||||
|
||||
overlay.Show();
|
||||
});
|
||||
|
||||
AddStep("hide", () => overlay.Hide());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
public class TestSceneLoadingAnimation : OsuGridTestScene
|
||||
public class TestSceneLoadingSpinner : OsuGridTestScene
|
||||
{
|
||||
public TestSceneLoadingAnimation()
|
||||
public TestSceneLoadingSpinner()
|
||||
: base(2, 2)
|
||||
{
|
||||
LoadingSpinner loading;
|
||||
@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Colour = Color4.White,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
loading = new LoadingSpinner()
|
||||
loading = new LoadingSpinner(true)
|
||||
});
|
||||
|
||||
loading.Show();
|
@ -35,6 +35,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
MainContents.RelativeSizeAxes = Axes.None;
|
||||
}
|
||||
|
||||
public override bool HandleNonPositionalInput => false;
|
||||
|
||||
protected override bool Handle(UIEvent e)
|
||||
{
|
||||
switch (e)
|
||||
|
Loading…
Reference in New Issue
Block a user