chore: don't use ImGuiScene.TextureWrap for any external API, IDalamudTextureWrap does not inherit from ImGuiScene.TextureWrap any longer

This commit is contained in:
goat 2023-09-23 13:05:19 +02:00
parent af52da06b0
commit 6fbcd0e0e4
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
17 changed files with 91 additions and 78 deletions

View file

@ -62,8 +62,8 @@ internal class PluginInstallerWindow : Window, IDisposable
private string[] testerImagePaths = new string[5];
private string testerIconPath = string.Empty;
private TextureWrap?[] testerImages;
private TextureWrap? testerIcon;
private IDalamudTextureWrap?[] testerImages;
private IDalamudTextureWrap? testerIcon;
private bool testerError = false;
private bool testerUpdateAvailable = false;
@ -1525,7 +1525,7 @@ internal class PluginInstallerWindow : Window, IDisposable
ImGuiHelpers.ScaledDummy(20);
static void CheckImageSize(TextureWrap? image, int maxWidth, int maxHeight, bool requireSquare)
static void CheckImageSize(IDalamudTextureWrap? image, int maxWidth, int maxHeight, bool requireSquare)
{
if (image == null)
return;
@ -1570,7 +1570,7 @@ internal class PluginInstallerWindow : Window, IDisposable
this.testerIcon = im.LoadImage(this.testerIconPath);
}
this.testerImages = new TextureWrap[this.testerImagePaths.Length];
this.testerImages = new IDalamudTextureWrap[this.testerImagePaths.Length];
for (var i = 0; i < this.testerImagePaths.Length; i++)
{
@ -1822,7 +1822,7 @@ internal class PluginInstallerWindow : Window, IDisposable
var rectOffset = ImGui.GetWindowContentRegionMin() + ImGui.GetWindowPos();
if (ImGui.IsRectVisible(rectOffset + cursorBeforeImage, rectOffset + cursorBeforeImage + iconSize))
{
TextureWrap icon;
IDalamudTextureWrap icon;
if (log is PluginChangelogEntry pluginLog)
{
icon = this.imageCache.DefaultIcon;