feat: expose AddNotification API on UiBuilder

This commit is contained in:
goat 2021-08-24 14:39:39 +02:00
parent 66daa03da3
commit 33cbad9f16
No known key found for this signature in database
GPG key ID: F18F057873895461
7 changed files with 90 additions and 78 deletions

View file

@ -15,6 +15,7 @@ using Dalamud.Game.Gui.Internal;
using Dalamud.Game.Internal.DXGI;
using Dalamud.Hooking;
using Dalamud.Hooking.Internal;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Utility;
using ImGuiNET;
using ImGuiScene;
@ -58,7 +59,7 @@ namespace Dalamud.Interface.Internal
/// </summary>
public InterfaceManager()
{
Service<Notifications>.Set();
Service<NotificationManager>.Set();
var scanner = Service<SigScanner>.Get();
@ -150,11 +151,6 @@ namespace Dalamud.Interface.Internal
/// </summary>
public static ImFontPtr MonoFont { get; private set; }
/// <summary>
/// Gets the manager for notifications/toasts.
/// </summary>
public Notifications Notifications { get; init; } = new();
/// <summary>
/// Gets or sets an action that is exexuted when fonts are rebuilt.
/// </summary>
@ -644,7 +640,7 @@ namespace Dalamud.Interface.Internal
this.lastWantCapture = this.LastImGuiIoPtr.WantCaptureMouse;
this.Draw?.Invoke();
Service<Notifications>.Get().Draw();
Service<NotificationManager>.Get().Draw();
}
}
}