mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add cancel event to ProgressNotification
This commit is contained in:
@ -152,11 +152,14 @@ namespace osu.Game.Overlays.Notifications
|
|||||||
break;
|
break;
|
||||||
case ProgressNotificationState.Active:
|
case ProgressNotificationState.Active:
|
||||||
case ProgressNotificationState.Queued:
|
case ProgressNotificationState.Queued:
|
||||||
State = ProgressNotificationState.Cancelled;
|
if (CancelRequested?.Invoke() != false)
|
||||||
|
State = ProgressNotificationState.Cancelled;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Func<bool> CancelRequested { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The function to post completion notifications back to.
|
/// The function to post completion notifications back to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Reference in New Issue
Block a user