From ca26fe802b92ad3e268494b2bc95b618876dbc24 Mon Sep 17 00:00:00 2001 From: Yorumoto Akira Date: Sat, 17 Apr 2021 20:08:50 +0200 Subject: [PATCH] allows direct printing of SeStrings in chat --- Dalamud/Game/Internal/Gui/ChatGui.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/Internal/Gui/ChatGui.cs b/Dalamud/Game/Internal/Gui/ChatGui.cs index 5c903a5c5..4a542a79b 100644 --- a/Dalamud/Game/Internal/Gui/ChatGui.cs +++ b/Dalamud/Game/Internal/Gui/ChatGui.cs @@ -303,21 +303,37 @@ namespace Dalamud.Game.Internal.Gui { } public void Print(string message) { - Log.Verbose("[CHATGUI PRINT]{0}", message); + Log.Verbose("[CHATGUI PRINT REGULAR]{0}", message); PrintChat(new XivChatEntry { MessageBytes = Encoding.UTF8.GetBytes(message), Type = this.dalamud.Configuration.GeneralChatType }); } + public void Print(SeString message) { + Log.Verbose("[CHATGUI PRINT SESTRING]{0}", message.TextValue); + PrintChat(new XivChatEntry { + MessageBytes = message.Encode(), + Type = this.dalamud.Configuration.GeneralChatType + }); + } + public void PrintError(string message) { - Log.Verbose("[CHATGUI PRINT ERROR]{0}", message); + Log.Verbose("[CHATGUI PRINT REGULAR ERROR]{0}", message); PrintChat(new XivChatEntry { MessageBytes = Encoding.UTF8.GetBytes(message), Type = XivChatType.Urgent }); } + public void PrintError(SeString message) { + Log.Verbose("[CHATGUI PRINT SESTRING ERROR]{0}", message.TextValue); + PrintChat(new XivChatEntry { + MessageBytes = message.Encode(), + Type = XivChatType.Urgent + }); + } + /// /// Process a chat queue. ///