Allow the notification overlay to close when all notifications are dismissed

This commit is contained in:
Dean Herbert
2017-08-22 19:51:42 +09:00
parent ad16f41e26
commit 480d839d67
3 changed files with 14 additions and 3 deletions

View File

@ -19,9 +19,9 @@ namespace osu.Game.Overlays.Notifications
public abstract class Notification : Container
{
/// <summary>
/// Use requested close.
/// User requested close.
/// </summary>
public Action Closed;
public event Action Closed;
/// <summary>
/// Run on user activating the notification. Return true to close.

View File

@ -24,6 +24,8 @@ namespace osu.Game.Overlays.Notifications
private FlowContainer<Notification> notifications;
public int DisplayedCount => notifications.Count;
public void Add(Notification notification)
{
notifications.Add(notification);