From 463caf84e223f8fdac62aafafdb5da592c5bf0d6 Mon Sep 17 00:00:00 2001 From: goaaats <16760685+goaaats@users.noreply.github.com> Date: Sat, 15 Jan 2022 02:23:16 +0100 Subject: [PATCH] feat(PluginInstaller): add third party plugin badge --- Dalamud/Interface/Internal/Windows/PluginImageCache.cs | 9 ++++++++- .../Interface/Internal/Windows/PluginInstallerWindow.cs | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs index d25c3a7f0..d0ff74137 100644 --- a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs +++ b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs @@ -62,6 +62,7 @@ namespace Dalamud.Interface.Internal.Windows this.TroubleIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "troubleIcon.png"))!; this.UpdateIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "updateIcon.png"))!; this.InstalledIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "installedIcon.png"))!; + this.ThirdIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "thirdIcon.png"))!; this.downloadThread = new Thread(this.DownloadTask); this.downloadThread.Start(); @@ -85,7 +86,12 @@ namespace Dalamud.Interface.Internal.Windows /// /// Gets the plugin installed icon overlay. /// - public TextureWrap InstalledIcon { get; set; } + public TextureWrap InstalledIcon { get; } + + /// + /// Gets the third party plugin icon overlay. + /// + public TextureWrap ThirdIcon { get; } /// public void Dispose() @@ -94,6 +100,7 @@ namespace Dalamud.Interface.Internal.Windows this.TroubleIcon?.Dispose(); this.UpdateIcon?.Dispose(); this.InstalledIcon?.Dispose(); + this.ThirdIcon?.Dispose(); this.downloadToken?.Cancel(); diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index 88db0faf7..a99603227 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -1074,6 +1074,12 @@ namespace Dalamud.Interface.Internal.Windows ImGui.Image(this.imageCache.TroubleIcon.ImGuiHandle, iconSize); ImGui.SameLine(); } + else if (isThirdParty) + { + ImGui.SetCursorPos(cursorBeforeImage); + ImGui.Image(this.imageCache.ThirdIcon.ImGuiHandle, iconSize); + ImGui.SameLine(); + } else if (plugin != null) { ImGui.SetCursorPos(cursorBeforeImage);