mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Combine all loading animation implementations
This commit is contained in:
@ -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);
|
||||
|
||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using System.Linq;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
@ -13,6 +12,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using osu.Game.Users;
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
private readonly Box background;
|
||||
private readonly ScoreTable scoreTable;
|
||||
private readonly FillFlowContainer topScoresContainer;
|
||||
private readonly DimmedLoadingLayer loading;
|
||||
private readonly LoadingLayer loading;
|
||||
private readonly LeaderboardModSelector modSelector;
|
||||
private readonly NoScoresPlaceholder noScoresPlaceholder;
|
||||
private readonly FillFlowContainer content;
|
||||
@ -160,16 +160,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
}
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
CornerRadius = 5,
|
||||
Child = loading = new DimmedLoadingLayer(iconScale: 0.8f)
|
||||
{
|
||||
Alpha = 0,
|
||||
},
|
||||
}
|
||||
loading = new LoadingLayer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user