mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Update direct panel download button for new design
- Add a download failed event to BeatmapManager - Make DownloadButton aware of all 3 possible download states - Change button appearance based on each state
This commit is contained in:
@ -45,6 +45,11 @@ namespace osu.Game.Beatmaps
|
||||
/// </summary>
|
||||
public event Action<DownloadBeatmapSetRequest> BeatmapDownloadBegan;
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a beatmap download is interrupted, due to user cancellation or other failures.
|
||||
/// </summary>
|
||||
public event Action<DownloadBeatmapSetRequest> BeatmapDownloadFailed;
|
||||
|
||||
/// <summary>
|
||||
/// A default representation of a WorkingBeatmap to use when no beatmap is available.
|
||||
/// </summary>
|
||||
@ -175,6 +180,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
request.Failure += error =>
|
||||
{
|
||||
BeatmapDownloadFailed?.Invoke(request);
|
||||
|
||||
if (error is OperationCanceledException) return;
|
||||
|
||||
downloadNotification.State = ProgressNotificationState.Cancelled;
|
||||
|
Reference in New Issue
Block a user