diff --git a/Dalamud/Game/ChatHandlers.cs b/Dalamud/Game/ChatHandlers.cs index 78df4ae1f..cbdca6271 100644 --- a/Dalamud/Game/ChatHandlers.cs +++ b/Dalamud/Game/ChatHandlers.cs @@ -24,6 +24,8 @@ namespace Dalamud.Game { private readonly Dalamud dalamud; + private DalamudLinkPayload openInstallerWindowLink; + private readonly Dictionary HandledChatTypeColors = new Dictionary { {XivChatType.CrossParty, Color.DodgerBlue}, {XivChatType.Party, Color.DodgerBlue}, @@ -87,6 +89,10 @@ namespace Dalamud.Game { dalamud.Framework.Gui.Chat.OnCheckMessageHandled += OnCheckMessageHandled; dalamud.Framework.Gui.Chat.OnChatMessage += OnChatMessage; + + this.openInstallerWindowLink = this.dalamud.Framework.Gui.Chat.AddChatLinkHandler("Dalamud", 1001, (i) => { + this.dalamud.OpenPluginInstaller(); + }); } private void OnCheckMessageHandled(XivChatType type, uint senderid, ref SeString sender, ref SeString message, ref bool isHandled) { @@ -233,7 +239,16 @@ namespace Dalamud.Game { } } else { this.dalamud.Framework.Gui.Chat.PrintChat(new XivChatEntry { - MessageBytes = Encoding.UTF8.GetBytes(Loc.Localize("DalamudPluginUpdateRequired", "One or more of your plugins needs to be updated. Please use the /xlplugins command in-game to update them!")), + MessageBytes = new SeString(new List() { + new TextPayload(Loc.Localize("DalamudPluginUpdateRequired", "One or more of your plugins needs to be updated. Please use the /xlplugins command in-game to update them!")), + new TextPayload(" ["), + new UIForegroundPayload(this.dalamud.Data, 500), + this.openInstallerWindowLink, + new TextPayload(Loc.Localize("DalamudInstallerHelp", "Open the plugin installer")), + RawPayload.LinkTerminator, + new UIForegroundPayload(this.dalamud.Data, 0), + new TextPayload("]"), + }).Encode(), Type = XivChatType.Urgent }); }