From cfb78de6164b45b5d85a226948aa147b2eadd643 Mon Sep 17 00:00:00 2001 From: Anna Date: Sun, 3 Sep 2023 18:04:08 -0400 Subject: [PATCH] refactor: use new ITextureProvider --- QuestMap/Plugin.cs | 4 ++++ QuestMap/PluginUi.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/QuestMap/Plugin.cs b/QuestMap/Plugin.cs index 7f6de49..148b93e 100644 --- a/QuestMap/Plugin.cs +++ b/QuestMap/Plugin.cs @@ -5,6 +5,7 @@ using Dalamud.Game.Command; using Dalamud.Game.Gui; using Dalamud.IoC; using Dalamud.Plugin; +using Dalamud.Plugin.Services; using XivCommon; namespace QuestMap { @@ -27,6 +28,9 @@ namespace QuestMap { [PluginService] internal GameGui GameGui { get; init; } = null!; + [PluginService] + internal ITextureProvider TextureProvider { get; init; } = null!; + internal XivCommonBase Common { get; } internal Configuration Config { get; } internal Quests Quests { get; } diff --git a/QuestMap/PluginUi.cs b/QuestMap/PluginUi.cs index 7fa210e..0031892 100644 --- a/QuestMap/PluginUi.cs +++ b/QuestMap/PluginUi.cs @@ -403,7 +403,7 @@ namespace QuestMap { return wrap; } - wrap = this.Plugin.DataManager.GetImGuiTextureIcon(this.Plugin.ClientState.ClientLanguage, id); + wrap = this.Plugin.TextureProvider.GetIcon(id); if (wrap != null) { this.Icons[id] = wrap; }