mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +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.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterfaceV2;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
@ -39,6 +40,8 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
private BeatmapVerifier generalVerifier;
|
private BeatmapVerifier generalVerifier;
|
||||||
private BeatmapVerifierContext context;
|
private BeatmapVerifierContext context;
|
||||||
|
|
||||||
|
private LoadingLayer loading;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colours)
|
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)
|
if (refreshOperation?.IsCompleted == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
loading.Show();
|
||||||
table.Issues.Clear();
|
table.Issues.Clear();
|
||||||
|
|
||||||
refreshOperation = Task.Run(() =>
|
refreshOperation = Task.Run(() =>
|
||||||
@ -117,6 +122,7 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
table.Issues.AddRange(issues);
|
table.Issues.AddRange(issues);
|
||||||
|
loading.Hide();
|
||||||
refreshOperation = null;
|
refreshOperation = null;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user