mirror of
https://github.com/ppy/osu
synced 2024-12-12 09:58:22 +00:00
Add loading spinner in case load takes longer than expected
This commit is contained in:
parent
ddaa95a1ca
commit
7921ad4516
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Menu;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
@ -43,10 +44,16 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
}
|
||||
|
||||
private void pushEditor()
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
this.Push(new Editor(this));
|
||||
ValidForResume = false;
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
||||
new LoadingSpinner(true)
|
||||
{
|
||||
State = { Value = Visibility.Visible },
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ScheduleDifficultySwitch(BeatmapInfo beatmapInfo)
|
||||
@ -62,6 +69,12 @@ namespace osu.Game.Screens.Edit
|
||||
});
|
||||
}
|
||||
|
||||
private void pushEditor()
|
||||
{
|
||||
this.Push(new Editor(this));
|
||||
ValidForResume = false;
|
||||
}
|
||||
|
||||
public void CancelPendingDifficultySwitch()
|
||||
{
|
||||
scheduledDifficultySwitch?.Cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user