feat(PluginInstaller): add third party plugin badge

This commit is contained in:
goaaats 2022-01-15 02:23:16 +01:00
parent 7128bc166b
commit 463caf84e2
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 14 additions and 1 deletions

View file

@ -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
/// <summary>
/// Gets the plugin installed icon overlay.
/// </summary>
public TextureWrap InstalledIcon { get; set; }
public TextureWrap InstalledIcon { get; }
/// <summary>
/// Gets the third party plugin icon overlay.
/// </summary>
public TextureWrap ThirdIcon { get; }
/// <inheritdoc/>
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();

View file

@ -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);