mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +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();
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Clear cached images/icons"))
|
||||
{
|
||||
this.pluginWindow?.ClearIconCache();
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.MenuItem("Open Plugin Stats"))
|
||||
|
|
|
|||
|
|
@ -164,6 +164,17 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
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 void DrawHeader()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue