mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +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 interfaceManager = Service<InterfaceManager>.Get();
|
||||
|
||||
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.UpdateIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "updateIcon.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.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.Start();
|
||||
|
|
@ -81,12 +82,18 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
/// </summary>
|
||||
public TextureWrap UpdateIcon { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin installed icon overlay.
|
||||
/// </summary>
|
||||
public TextureWrap InstalledIcon { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
this.DefaultIcon?.Dispose();
|
||||
this.TroubleIcon?.Dispose();
|
||||
this.UpdateIcon?.Dispose();
|
||||
this.InstalledIcon?.Dispose();
|
||||
|
||||
this.downloadToken?.Cancel();
|
||||
|
||||
|
|
|
|||
|
|
@ -1072,6 +1072,12 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.Image(this.imageCache.TroubleIcon.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
else if (plugin != null)
|
||||
{
|
||||
ImGui.SetCursorPos(cursorBeforeImage);
|
||||
ImGui.Image(this.imageCache.InstalledIcon.ImGuiHandle, iconSize);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
ImGui.SameLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue