Update header icon logic for Dalamud changes

This commit is contained in:
Liza 2023-11-09 11:35:27 +01:00
parent 4122853a96
commit 9ade97fbad
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 5 additions and 10 deletions

2
LLib

@ -1 +1 @@
Subproject commit e59d291f04473eae0b76712397733e2e25349953 Subproject commit 865a6080319f8ccbcd5fd5b0004404822b6e60d4

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<Version>0.4</Version> <Version>1.0</Version>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -87,7 +87,7 @@ public class SquadronistaPlugin : IDalamudPlugin
_addonLifecycle.RegisterListener(AddonEvent.PostRefresh, "GcArmyExpedition", UpdateExpeditionState); _addonLifecycle.RegisterListener(AddonEvent.PostRefresh, "GcArmyExpedition", UpdateExpeditionState);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "GcArmyExpedition", UpdateExpeditionState); _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "GcArmyExpedition", UpdateExpeditionState);
_mainWindow = new MainWindow(this, pluginInterface, pluginLog, addonLifecycle, gameGui); _mainWindow = new MainWindow(this, pluginLog, addonLifecycle, gameGui);
_windowSystem.AddWindow(_mainWindow); _windowSystem.AddWindow(_mainWindow);
} }

View File

@ -7,7 +7,6 @@ using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
using Dalamud.Game.Text; using Dalamud.Game.Text;
using Dalamud.Interface.Colors; using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
using Dalamud.Plugin;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Client.UI.Agent;
@ -21,20 +20,18 @@ using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
namespace Squadronista.Windows; namespace Squadronista.Windows;
internal sealed class MainWindow : Window, IDisposable internal sealed class MainWindow : LImGui.LWindow, IDisposable
{ {
private readonly SquadronistaPlugin _plugin; private readonly SquadronistaPlugin _plugin;
private readonly DalamudPluginInterface _pluginInterface;
private readonly IPluginLog _pluginLog; private readonly IPluginLog _pluginLog;
private readonly IAddonLifecycle _addonLifecycle; private readonly IAddonLifecycle _addonLifecycle;
private readonly IGameGui _gameGui; private readonly IGameGui _gameGui;
public MainWindow(SquadronistaPlugin plugin, DalamudPluginInterface pluginInterface, IPluginLog pluginLog, public MainWindow(SquadronistaPlugin plugin, IPluginLog pluginLog,
IAddonLifecycle addonLifecycle, IGameGui gameGui) IAddonLifecycle addonLifecycle, IGameGui gameGui)
: base("Squadronista##SquadronistaMainWindow") : base("Squadronista##SquadronistaMainWindow")
{ {
_plugin = plugin; _plugin = plugin;
_pluginInterface = pluginInterface;
_pluginLog = pluginLog; _pluginLog = pluginLog;
_addonLifecycle = addonLifecycle; _addonLifecycle = addonLifecycle;
_gameGui = gameGui; _gameGui = gameGui;
@ -92,8 +89,6 @@ internal sealed class MainWindow : Window, IDisposable
public override unsafe void Draw() public override unsafe void Draw()
{ {
LImGui.AddPatreonIcon(_pluginInterface);
var agentExpedition = AgentGcArmyExpedition.Instance(); var agentExpedition = AgentGcArmyExpedition.Instance();
if (agentExpedition == null || agentExpedition->SelectedRow >= _plugin.AvailableMissions.Count) if (agentExpedition == null || agentExpedition->SelectedRow >= _plugin.AvailableMissions.Count)
{ {