Code/Notification.cs
using System.Collections.Generic;
using System.Linq;
namespace BetterUI;
public static class Notification
{
public static void Push( INotification notification )
{
var system = Game.ActiveScene.GetSystem<NotificationSystem>();
system.Push( notification );
}
public static IEnumerable<INotification> GetNotifications() =>
Game.ActiveScene.GetSystem<NotificationSystem>().GetNotifications();
public static IEnumerable<T> GetNotifications<T>() where T : INotification =>
Game.ActiveScene.GetSystem<NotificationSystem>().GetNotifications<T>();
public static void Clear() => Game.ActiveScene.GetSystem<NotificationSystem>().Clear();
public static void Clear<T>() where T : INotification =>
Game.ActiveScene.GetSystem<NotificationSystem>().Clear<T>();
public static int Count() => Game.ActiveScene.GetSystem<NotificationSystem>().GetNotifications().Count();
}