mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 21:24:16 +01:00
feat: expose AddNotification API on UiBuilder
This commit is contained in:
parent
66daa03da3
commit
33cbad9f16
7 changed files with 90 additions and 78 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue