mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Add loading spinner
This commit is contained in:
parent
73be2f358f
commit
5575ea82c1
@ -13,6 +13,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
@ -39,6 +40,8 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
private BeatmapVerifier generalVerifier;
|
||||
private BeatmapVerifierContext context;
|
||||
|
||||
private LoadingLayer loading;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colours)
|
||||
{
|
||||
@ -79,6 +82,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
},
|
||||
}
|
||||
},
|
||||
loading = new LoadingLayer()
|
||||
};
|
||||
}
|
||||
|
||||
@ -100,6 +104,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
if (refreshOperation?.IsCompleted == false)
|
||||
return;
|
||||
|
||||
loading.Show();
|
||||
table.Issues.Clear();
|
||||
|
||||
refreshOperation = Task.Run(() =>
|
||||
@ -117,6 +122,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
Schedule(() =>
|
||||
{
|
||||
table.Issues.AddRange(issues);
|
||||
loading.Hide();
|
||||
refreshOperation = null;
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user