1
0
Fork 0

Update header icon logic for Dalamud changes

master v3.2
Liza 2023-11-09 11:28:31 +01:00
parent 030cb235f1
commit a4fc9bc954
Signed by: liza
GPG Key ID: 7199F8D727D55F67
5 changed files with 8 additions and 15 deletions

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>3.1</Version> <Version>3.2</Version>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
@ -24,8 +24,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\AutoRetainerAPI\AutoRetainerAPI\AutoRetainerAPI.csproj" /> <ProjectReference Include="..\AutoRetainerAPI\AutoRetainerAPI\AutoRetainerAPI.csproj"/>
<ProjectReference Include="..\ECommons\ECommons\ECommons.csproj" /> <ProjectReference Include="..\ECommons\ECommons\ECommons.csproj"/>
<ProjectReference Include="..\LLib\LLib.csproj"/> <ProjectReference Include="..\LLib\LLib.csproj"/>
</ItemGroup> </ItemGroup>

View File

@ -68,7 +68,7 @@ public class AutoDiscardPlogon : IDalamudPlugin
_pluginInterface.UiBuilder.Draw += _windowSystem.Draw; _pluginInterface.UiBuilder.Draw += _windowSystem.Draw;
_pluginInterface.UiBuilder.OpenConfigUi += OpenConfigUi; _pluginInterface.UiBuilder.OpenConfigUi += OpenConfigUi;
_discardWindow = new(_pluginInterface, _inventoryUtils, itemCache, clientState, condition); _discardWindow = new(_inventoryUtils, itemCache, clientState, condition);
_windowSystem.AddWindow(_discardWindow); _windowSystem.AddWindow(_discardWindow);
_configWindow = new(_pluginInterface, _configuration, itemCache, clientState, condition); _configWindow = new(_pluginInterface, _configuration, itemCache, clientState, condition);

View File

@ -16,7 +16,7 @@ using LLib;
namespace ARDiscard.Windows; namespace ARDiscard.Windows;
internal sealed class ConfigWindow : Window internal sealed class ConfigWindow : LImGui.LWindow
{ {
private readonly DalamudPluginInterface _pluginInterface; private readonly DalamudPluginInterface _pluginInterface;
private readonly Configuration _configuration; private readonly Configuration _configuration;
@ -58,8 +58,6 @@ internal sealed class ConfigWindow : Window
public override void Draw() public override void Draw()
{ {
LImGui.AddPatreonIcon(_pluginInterface);
bool runAfterVenture = _configuration.RunAfterVenture; bool runAfterVenture = _configuration.RunAfterVenture;
if (ImGui.Checkbox("[Global] Run automatically after AutoRetainer's venture", ref runAfterVenture)) if (ImGui.Checkbox("[Global] Run automatically after AutoRetainer's venture", ref runAfterVenture))
{ {

View File

@ -5,7 +5,6 @@ using ARDiscard.GameData;
using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Conditions;
using Dalamud.Interface.Utility; using Dalamud.Interface.Utility;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
using Dalamud.Plugin;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Common.Math; using FFXIVClientStructs.FFXIV.Common.Math;
using ImGuiNET; using ImGuiNET;
@ -13,20 +12,19 @@ using LLib;
namespace ARDiscard.Windows; namespace ARDiscard.Windows;
internal sealed class DiscardWindow : Window internal sealed class DiscardWindow : LImGui.LWindow
{ {
private readonly InventoryUtils _inventoryUtils; private readonly InventoryUtils _inventoryUtils;
private readonly ItemCache _itemCache; private readonly ItemCache _itemCache;
private readonly IClientState _clientState; private readonly IClientState _clientState;
private readonly ICondition _condition; private readonly ICondition _condition;
private readonly DalamudPluginInterface _pluginInterface;
private List<SelectableItem> _displayedItems = new(); private List<SelectableItem> _displayedItems = new();
public event EventHandler? OpenConfigurationClicked; public event EventHandler? OpenConfigurationClicked;
public event EventHandler<ItemFilter>? DiscardAllClicked; public event EventHandler<ItemFilter>? DiscardAllClicked;
public DiscardWindow(DalamudPluginInterface pluginInterface, InventoryUtils inventoryUtils, ItemCache itemCache, public DiscardWindow(InventoryUtils inventoryUtils, ItemCache itemCache,
IClientState clientState, ICondition condition) IClientState clientState, ICondition condition)
: base("Discard Items###AutoDiscardDiscard") : base("Discard Items###AutoDiscardDiscard")
{ {
@ -34,7 +32,6 @@ internal sealed class DiscardWindow : Window
_itemCache = itemCache; _itemCache = itemCache;
_clientState = clientState; _clientState = clientState;
_condition = condition; _condition = condition;
_pluginInterface = pluginInterface;
Size = new Vector2(600, 400); Size = new Vector2(600, 400);
SizeCondition = ImGuiCond.FirstUseEver; SizeCondition = ImGuiCond.FirstUseEver;
@ -50,8 +47,6 @@ internal sealed class DiscardWindow : Window
public override void Draw() public override void Draw()
{ {
LImGui.AddPatreonIcon(_pluginInterface);
ImGui.Text("With your current configuration, the following items would be discarded:"); ImGui.Text("With your current configuration, the following items would be discarded:");
ImGui.BeginDisabled(Locked); ImGui.BeginDisabled(Locked);

2
LLib

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