2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-06-22 03:30:40 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2018-11-20 07:51:59 +00:00
|
|
|
|
using osuTK.Graphics;
|
2018-06-22 03:30:40 +00:00
|
|
|
|
|
2019-03-24 16:02:36 +00:00
|
|
|
|
namespace osu.Game.Tests.Visual.UserInterface
|
2018-06-22 03:30:40 +00:00
|
|
|
|
{
|
2020-02-21 07:20:55 +00:00
|
|
|
|
public class TestSceneLoadingSpinner : OsuGridTestScene
|
2018-06-22 03:30:40 +00:00
|
|
|
|
{
|
2020-02-21 07:20:55 +00:00
|
|
|
|
public TestSceneLoadingSpinner()
|
2018-06-22 03:30:40 +00:00
|
|
|
|
: base(2, 2)
|
|
|
|
|
{
|
2020-02-21 06:33:31 +00:00
|
|
|
|
LoadingSpinner loading;
|
2018-06-22 03:30:40 +00:00
|
|
|
|
|
|
|
|
|
Cell(0).AddRange(new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
Colour = Color4.Black,
|
|
|
|
|
RelativeSizeAxes = Axes.Both
|
|
|
|
|
},
|
2020-02-21 06:33:31 +00:00
|
|
|
|
loading = new LoadingSpinner()
|
2018-06-22 03:30:40 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
loading.Show();
|
|
|
|
|
|
|
|
|
|
Cell(1).AddRange(new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
Colour = Color4.White,
|
|
|
|
|
RelativeSizeAxes = Axes.Both
|
|
|
|
|
},
|
2020-02-21 07:21:44 +00:00
|
|
|
|
loading = new LoadingSpinner(true)
|
2018-06-22 03:30:40 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
loading.Show();
|
|
|
|
|
|
|
|
|
|
Cell(2).AddRange(new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
Colour = Color4.Gray,
|
|
|
|
|
RelativeSizeAxes = Axes.Both
|
|
|
|
|
},
|
2020-02-21 06:33:31 +00:00
|
|
|
|
loading = new LoadingSpinner()
|
2018-06-22 03:30:40 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
loading.Show();
|
|
|
|
|
|
|
|
|
|
Cell(3).AddRange(new Drawable[]
|
|
|
|
|
{
|
2020-02-21 06:33:31 +00:00
|
|
|
|
loading = new LoadingSpinner()
|
2018-06-22 03:30:40 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Scheduler.AddDelayed(() => loading.ToggleVisibility(), 200, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|