1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 19:07:25 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneLoadingSpinner.cs

63 lines
1.6 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.UserInterface;
2018-11-20 15:51:59 +08:00
using osuTK.Graphics;
2019-03-25 00:02:36 +08:00
namespace osu.Game.Tests.Visual.UserInterface
{
2020-02-21 15:20:55 +08:00
public class TestSceneLoadingSpinner : OsuGridTestScene
{
2020-02-21 15:20:55 +08:00
public TestSceneLoadingSpinner()
: base(2, 2)
{
LoadingSpinner loading;
Cell(0).AddRange(new Drawable[]
{
new Box
{
Colour = Color4.Black,
RelativeSizeAxes = Axes.Both
},
loading = new LoadingSpinner()
});
loading.Show();
Cell(1).AddRange(new Drawable[]
{
new Box
{
Colour = Color4.White,
RelativeSizeAxes = Axes.Both
},
2020-02-21 15:21:44 +08:00
loading = new LoadingSpinner(true)
});
loading.Show();
Cell(2).AddRange(new Drawable[]
{
new Box
{
Colour = Color4.Gray,
RelativeSizeAxes = Axes.Both
},
loading = new LoadingSpinner()
});
loading.Show();
Cell(3).AddRange(new Drawable[]
{
loading = new LoadingSpinner()
});
Scheduler.AddDelayed(() => loading.ToggleVisibility(), 200, true);
}
}
}