mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add option to clear image cache to Plugin menu
This commit is contained in:
parent
4921c289e0
commit
029f798b91
2 changed files with 16 additions and 0 deletions
|
|
@ -496,6 +496,11 @@ namespace Dalamud.Interface.Internal
|
||||||
this.OpenPluginInstaller();
|
this.OpenPluginInstaller();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.MenuItem("Clear cached images/icons"))
|
||||||
|
{
|
||||||
|
this.pluginWindow?.ClearIconCache();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
if (ImGui.MenuItem("Open Plugin Stats"))
|
if (ImGui.MenuItem("Open Plugin Stats"))
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,17 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
this.DrawErrorModal();
|
this.DrawErrorModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clear the cache of downloaded icons.
|
||||||
|
/// </summary>
|
||||||
|
public void ClearIconCache()
|
||||||
|
{
|
||||||
|
this.pluginIconMap.Clear();
|
||||||
|
this.pluginImagesMap.Clear();
|
||||||
|
|
||||||
|
this.DownloadPluginIcons();
|
||||||
|
}
|
||||||
|
|
||||||
private static Vector2 GetButtonSize(string text) => ImGui.CalcTextSize(text) + (ImGui.GetStyle().FramePadding * 2);
|
private static Vector2 GetButtonSize(string text) => ImGui.CalcTextSize(text) + (ImGui.GetStyle().FramePadding * 2);
|
||||||
|
|
||||||
private void DrawHeader()
|
private void DrawHeader()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue