refactor: update for api 9
This commit is contained in:
parent
fae049bbf6
commit
7883004ece
@ -1,8 +1,4 @@
|
|||||||
using System.Threading.Channels;
|
using System.Threading.Channels;
|
||||||
using Dalamud.Data;
|
|
||||||
using Dalamud.Game.ClientState;
|
|
||||||
using Dalamud.Game.Command;
|
|
||||||
using Dalamud.Game.Gui;
|
|
||||||
using Dalamud.IoC;
|
using Dalamud.IoC;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
@ -11,22 +7,22 @@ using XivCommon;
|
|||||||
namespace QuestMap {
|
namespace QuestMap {
|
||||||
// ReSharper disable once ClassNeverInstantiated.Global
|
// ReSharper disable once ClassNeverInstantiated.Global
|
||||||
internal class Plugin : IDalamudPlugin {
|
internal class Plugin : IDalamudPlugin {
|
||||||
public string Name => "Quest Map";
|
internal static string Name => "Quest Map";
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal DalamudPluginInterface Interface { get; init; } = null!;
|
internal DalamudPluginInterface Interface { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal ClientState ClientState { get; init; } = null!;
|
internal IClientState ClientState { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal CommandManager CommandManager { get; init; } = null!;
|
internal ICommandManager CommandManager { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal DataManager DataManager { get; init; } = null!;
|
internal IDataManager DataManager { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal GameGui GameGui { get; init; } = null!;
|
internal IGameGui GameGui { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal ITextureProvider TextureProvider { get; init; } = null!;
|
internal ITextureProvider TextureProvider { get; init; } = null!;
|
||||||
|
@ -9,8 +9,8 @@ using Dalamud;
|
|||||||
using Dalamud.Game.Text.SeStringHandling;
|
using Dalamud.Game.Text.SeStringHandling;
|
||||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
using Dalamud.Interface.Internal;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using ImGuiScene;
|
|
||||||
using Lumina.Data;
|
using Lumina.Data;
|
||||||
using Lumina.Excel;
|
using Lumina.Excel;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
using Lumina.Excel.GeneratedSheets;
|
||||||
@ -41,7 +41,7 @@ namespace QuestMap {
|
|||||||
private ChannelReader<GraphInfo> GraphChannel { get; }
|
private ChannelReader<GraphInfo> GraphChannel { get; }
|
||||||
private CancellationTokenSource? CancellationTokenSource { get; set; }
|
private CancellationTokenSource? CancellationTokenSource { get; set; }
|
||||||
private HashSet<uint> InfoWindows { get; } = new();
|
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();
|
private List<(Quest, bool, string)> FilteredQuests { get; } = new();
|
||||||
|
|
||||||
internal bool Show;
|
internal bool Show;
|
||||||
@ -198,7 +198,7 @@ namespace QuestMap {
|
|||||||
|
|
||||||
ImGui.SetNextWindowSize(new Vector2(675, 600), ImGuiCond.FirstUseEver);
|
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();
|
ImGui.End();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ namespace QuestMap {
|
|||||||
ImGui.PopFont();
|
ImGui.PopFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureWrap? GetIcon(uint id) {
|
IDalamudTextureWrap? GetIcon(uint id) {
|
||||||
if (this.Icons.TryGetValue(id, out var wrap)) {
|
if (this.Icons.TryGetValue(id, out var wrap)) {
|
||||||
return wrap;
|
return wrap;
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,6 @@
|
|||||||
<HintPath>$(DalamudLibPath)\ImGui.NET.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\ImGui.NET.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImGuiScene">
|
|
||||||
<HintPath>$(DalamudLibPath)\ImGuiScene.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Lumina">
|
<Reference Include="Lumina">
|
||||||
<HintPath>$(DalamudLibPath)\Lumina.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\Lumina.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
|
Loading…
Reference in New Issue
Block a user