Add ability to flick notifications to the right to store for later

This commit is contained in:
Dean Herbert
2022-09-12 20:18:40 +09:00
parent 802c5629c0
commit 88107108ee
3 changed files with 46 additions and 0 deletions

View File

@ -42,6 +42,8 @@ namespace osu.Game.Overlays.Notifications
/// </summary>
public Func<bool>? Activated;
public Action? ForwardToOverlay { get; set; }
/// <summary>
/// Should we show at the top of our section on display?
/// </summary>
@ -310,6 +312,8 @@ namespace osu.Game.Overlays.Notifications
{
if (Rotation < -10 || velocity.X < -0.3f)
notification.Close(true);
else if (X > 30 || velocity.X > 0.3f)
notification.ForwardToOverlay?.Invoke();
else
ResetPosition();