mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat(PluginInstaller): add special icon for third + installed
This commit is contained in:
parent
641dc83bd1
commit
f9da69b47c
2 changed files with 16 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
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.ThirdInstalledIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "thirdInstalledIcon.png"))!;
|
||||
|
||||
this.downloadThread = new Thread(this.DownloadTask);
|
||||
this.downloadThread.Start();
|
||||
|
|
@ -93,6 +94,11 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
/// </summary>
|
||||
public TextureWrap ThirdIcon { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the installed third party plugin icon overlay.
|
||||
/// </summary>
|
||||
public TextureWrap ThirdInstalledIcon { get; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
|
|
@ -101,6 +107,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
this.UpdateIcon?.Dispose();
|
||||
this.InstalledIcon?.Dispose();
|
||||
this.ThirdIcon?.Dispose();
|
||||
this.ThirdInstalledIcon?.Dispose();
|
||||
|
||||
this.downloadToken?.Cancel();
|
||||
|
||||
|
|
|
|||
|
|
@ -1062,6 +1062,8 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.Image(iconTex.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
|
||||
var isLoaded = plugin is { IsLoaded: true };
|
||||
|
||||
if (updateAvailable)
|
||||
{
|
||||
ImGui.SetCursorPos(cursorBeforeImage);
|
||||
|
|
@ -1074,13 +1076,19 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.Image(this.imageCache.TroubleIcon.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
else if (isLoaded && isThirdParty)
|
||||
{
|
||||
ImGui.SetCursorPos(cursorBeforeImage);
|
||||
ImGui.Image(this.imageCache.ThirdInstalledIcon.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
else if (isThirdParty)
|
||||
{
|
||||
ImGui.SetCursorPos(cursorBeforeImage);
|
||||
ImGui.Image(this.imageCache.ThirdIcon.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
else if (plugin is { IsLoaded: true })
|
||||
else if (isLoaded)
|
||||
{
|
||||
ImGui.SetCursorPos(cursorBeforeImage);
|
||||
ImGui.Image(this.imageCache.InstalledIcon.ImGuiHandle, iconSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue