refactor: update for api 9

This commit is contained in:
Anna 2023-09-28 02:48:18 -04:00
parent fae049bbf6
commit 7883004ece
Signed by: anna
GPG Key ID: D0943384CD9F87D1
3 changed files with 9 additions and 17 deletions

View File

@ -1,8 +1,4 @@
using System.Threading.Channels;
using Dalamud.Data;
using Dalamud.Game.ClientState;
using Dalamud.Game.Command;
using Dalamud.Game.Gui;
using Dalamud.IoC;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
@ -11,22 +7,22 @@ using XivCommon;
namespace QuestMap {
// ReSharper disable once ClassNeverInstantiated.Global
internal class Plugin : IDalamudPlugin {
public string Name => "Quest Map";
internal static string Name => "Quest Map";
[PluginService]
internal DalamudPluginInterface Interface { get; init; } = null!;
[PluginService]
internal ClientState ClientState { get; init; } = null!;
internal IClientState ClientState { get; init; } = null!;
[PluginService]
internal CommandManager CommandManager { get; init; } = null!;
internal ICommandManager CommandManager { get; init; } = null!;
[PluginService]
internal DataManager DataManager { get; init; } = null!;
internal IDataManager DataManager { get; init; } = null!;
[PluginService]
internal GameGui GameGui { get; init; } = null!;
internal IGameGui GameGui { get; init; } = null!;
[PluginService]
internal ITextureProvider TextureProvider { get; init; } = null!;

View File

@ -9,8 +9,8 @@ using Dalamud;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Interface;
using Dalamud.Interface.Internal;
using ImGuiNET;
using ImGuiScene;
using Lumina.Data;
using Lumina.Excel;
using Lumina.Excel.GeneratedSheets;
@ -41,7 +41,7 @@ namespace QuestMap {
private ChannelReader<GraphInfo> GraphChannel { get; }
private CancellationTokenSource? CancellationTokenSource { get; set; }
private HashSet<uint> InfoWindows { get; } = new();
private Dictionary<uint, TextureWrap> Icons { get; } = new();
private Dictionary<uint, IDalamudTextureWrap> Icons { get; } = new();
private List<(Quest, bool, string)> FilteredQuests { get; } = new();
internal bool Show;
@ -198,7 +198,7 @@ namespace QuestMap {
ImGui.SetNextWindowSize(new Vector2(675, 600), ImGuiCond.FirstUseEver);
if (!ImGui.Begin(this.Plugin.Name, ref this.Show, ImGuiWindowFlags.MenuBar)) {
if (!ImGui.Begin(Plugin.Name, ref this.Show, ImGuiWindowFlags.MenuBar)) {
ImGui.End();
return;
}
@ -398,7 +398,7 @@ namespace QuestMap {
ImGui.PopFont();
}
TextureWrap? GetIcon(uint id) {
IDalamudTextureWrap? GetIcon(uint id) {
if (this.Icons.TryGetValue(id, out var wrap)) {
return wrap;
}

View File

@ -33,10 +33,6 @@
<HintPath>$(DalamudLibPath)\ImGui.NET.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)\ImGuiScene.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)\Lumina.dll</HintPath>
<Private>False</Private>