diff --git a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs index 1b5797cfb2..85f76c9a50 100644 --- a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs +++ b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs @@ -9,6 +9,8 @@ using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; using Dalamud.Game.ClientState; using Dalamud.Game.Gui; +using Dalamud.Game.Text; +using Dalamud.Game.Text.SeStringHandling; using Dalamud.Interface.Animation.EasingFunctions; using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas.Internals; @@ -16,6 +18,8 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; +using Dalamud.Plugin.Internal; +using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Services; using Dalamud.Storage.Assets; using Dalamud.Support; @@ -442,10 +446,21 @@ private unsafe void OnVersionStringDraw(AddonEvent ev, AddonArgs args) var addon = (AtkUnitBase*)setupArgs.Addon; + var pluginCount = Service.GetNullable()?.InstalledPlugins + .Count(c => c.State == PluginState.Loaded) ?? 0; + + var seText = new SeStringBuilder() + .AddText(addon->AtkValues[1].GetValueAsString()) + .AddText("\n\n") + .AddUiForeground(SeIconChar.BoxedLetterD.ToIconString(), 539) + .AddUiForeground(561) + .AddText($" Dalamud: {Util.GetScmVersion()} ({this.trackName})") + .AddText($" - {pluginCount} {(pluginCount != 1 ? "plugins" : "plugin")} loaded") + .AddUiForegroundOff() + .Build(); + addon->GetTextNodeById(3)->TextFlags |= (byte)TextFlags.MultiLine; - addon->GetTextNodeById(3)->NodeText.SetString( - $"{addon->AtkValues[1].GetValueAsString()}" + - $"\n\nDalamud: {Util.GetScmVersion()} ({this.trackName})"); + addon->GetTextNodeById(3)->NodeText.SetString(seText.Encode()); } private void TitleScreenMenuEntryListChange() => this.privateAtlas.BuildFontsAsync();