mirror of
https://github.com/ppy/osu.git
synced 2024-12-19 20:33:05 +08:00
Make it possible to retrieve notifications from NotificationOverlay
This commit is contained in:
parent
1a1253a4aa
commit
bea34e3aab
@ -13,6 +13,7 @@ using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Threading;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
@ -22,6 +23,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
public const float TRANSITION_LENGTH = 600;
|
||||
|
||||
public IEnumerable<Notification> Notifications => sections.Children.SelectMany(s => s.Notifications);
|
||||
|
||||
private FlowContainer<NotificationSection> sections;
|
||||
|
||||
/// <summary>
|
||||
|
@ -21,6 +21,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
|
||||
private FlowContainer<Notification> notifications;
|
||||
|
||||
public IEnumerable<Notification> Notifications => notifications.Children;
|
||||
|
||||
public int DisplayedCount => notifications.Count(n => !n.WasClosed);
|
||||
public int UnreadCount => notifications.Count(n => !n.WasClosed && !n.Read);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user