mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 00:07:49 +01:00
feat: add special icon for installed plugins, makes it easier to spot them in the list
This commit is contained in:
parent
dd2313f7af
commit
0c9f331872
2 changed files with 16 additions and 3 deletions
|
|
@ -58,9 +58,10 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
var dalamud = Service<Dalamud>.Get();
|
var dalamud = Service<Dalamud>.Get();
|
||||||
var interfaceManager = Service<InterfaceManager>.Get();
|
var interfaceManager = Service<InterfaceManager>.Get();
|
||||||
|
|
||||||
this.DefaultIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "defaultIcon.png"));
|
this.DefaultIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "defaultIcon.png"))!;
|
||||||
this.TroubleIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "troubleIcon.png"));
|
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.UpdateIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "updateIcon.png"))!;
|
||||||
|
this.InstalledIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "installedIcon.png"))!;
|
||||||
|
|
||||||
this.downloadThread = new Thread(this.DownloadTask);
|
this.downloadThread = new Thread(this.DownloadTask);
|
||||||
this.downloadThread.Start();
|
this.downloadThread.Start();
|
||||||
|
|
@ -81,12 +82,18 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TextureWrap UpdateIcon { get; }
|
public TextureWrap UpdateIcon { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the plugin installed icon overlay.
|
||||||
|
/// </summary>
|
||||||
|
public TextureWrap InstalledIcon { get; set; }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
this.DefaultIcon?.Dispose();
|
this.DefaultIcon?.Dispose();
|
||||||
this.TroubleIcon?.Dispose();
|
this.TroubleIcon?.Dispose();
|
||||||
this.UpdateIcon?.Dispose();
|
this.UpdateIcon?.Dispose();
|
||||||
|
this.InstalledIcon?.Dispose();
|
||||||
|
|
||||||
this.downloadToken?.Cancel();
|
this.downloadToken?.Cancel();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1072,6 +1072,12 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
ImGui.Image(this.imageCache.TroubleIcon.ImGuiHandle, iconSize);
|
ImGui.Image(this.imageCache.TroubleIcon.ImGuiHandle, iconSize);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
else if (plugin != null)
|
||||||
|
{
|
||||||
|
ImGui.SetCursorPos(cursorBeforeImage);
|
||||||
|
ImGui.Image(this.imageCache.InstalledIcon.ImGuiHandle, iconSize);
|
||||||
|
ImGui.SameLine();
|
||||||
|
}
|
||||||
|
|
||||||
ImGuiHelpers.ScaledDummy(5);
|
ImGuiHelpers.ScaledDummy(5);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue