feat: show toasts in chat as well

This commit is contained in:
Anna 2022-07-09 01:44:02 -04:00
parent 942575e7b7
commit 400ff9e56a
1 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@ using Dalamud.Game.ClientState.Objects.SubKinds;
using Dalamud.Game.Command;
using Dalamud.Game.Gui;
using Dalamud.Game.Gui.Toast;
using Dalamud.Game.Text;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.IoC;
using Dalamud.Plugin;
@ -143,6 +144,11 @@ public class Plugin : IDalamudPlugin {
} else {
this.Interface.UiBuilder.AddNotification(message, this.Name, NotificationType.Info);
}
this.ChatGui.PrintChat(new XivChatEntry {
Type = XivChatType.SystemMessage,
Message = message,
});
}
internal void ShowError(string message) {
@ -151,5 +157,10 @@ public class Plugin : IDalamudPlugin {
} else {
this.Interface.UiBuilder.AddNotification(message, this.Name, NotificationType.Error);
}
this.ChatGui.PrintChat(new XivChatEntry {
Type = XivChatType.SystemError,
Message = message,
});
}
}