Combine all loading animation implementations

This commit is contained in:
Dean Herbert
2020-02-21 15:31:40 +09:00
parent e18d736e4a
commit 623b78d675
15 changed files with 185 additions and 225 deletions

View File

@ -5,7 +5,6 @@ using System.Diagnostics;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps;
@ -25,7 +24,7 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
private readonly BindableBool favourited = new BindableBool();
private PostBeatmapFavouriteRequest request;
private DimmedLoadingLayer loading;
private LoadingLayer loading;
private readonly Bindable<User> localUser = new Bindable<User>();
@ -54,14 +53,11 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
Size = new Vector2(18),
Shadow = false,
},
loading = new DimmedLoadingLayer(0.8f, 0.5f),
loading = new LoadingLayer(icon, false),
});
Action = () =>
{
if (loading.State.Value == Visibility.Visible)
return;
// guaranteed by disabled state above.
Debug.Assert(BeatmapSet.Value.OnlineBeatmapSetID != null);