mirror of https://github.com/ppy/osu
Add loading spinner while editor screen loads
This commit is contained in:
parent
943bcd0ca4
commit
b969bc03e0
|
@ -7,6 +7,7 @@
|
|||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Edit.Compose.Components;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
using osuTK.Graphics;
|
||||
|
@ -32,6 +33,8 @@ private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
|||
|
||||
Container mainContent;
|
||||
|
||||
LoadingSpinner spinner;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
mainContent = new Container
|
||||
|
@ -44,6 +47,10 @@ private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
|||
Top = vertical_margins + timeline_height,
|
||||
Bottom = vertical_margins
|
||||
},
|
||||
Child = spinner = new LoadingSpinner(true)
|
||||
{
|
||||
State = { Value = Visibility.Visible },
|
||||
},
|
||||
},
|
||||
new Container
|
||||
{
|
||||
|
@ -87,9 +94,10 @@ private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
|||
}
|
||||
},
|
||||
};
|
||||
|
||||
LoadComponentAsync(CreateMainContent(), content =>
|
||||
{
|
||||
spinner.State.Value = Visibility.Hidden;
|
||||
|
||||
mainContent.Add(content);
|
||||
content.FadeInFromZero(300, Easing.OutQuint);
|
||||
|
||||
|
|
Loading…
Reference in New Issue