Fix advanced dye buttons appearing in design panel.

This commit is contained in:
Ottermandias 2024-03-01 14:29:23 +01:00
parent 8496f86b6b
commit 436a975a44
3 changed files with 13 additions and 7 deletions

View file

@ -14,6 +14,12 @@ public struct EquipDrawData(EquipSlot slot, in DesignData designData)
public bool DisplayApplication;
public bool AllowRevert;
public readonly bool IsDesign
=> _object is Design;
public readonly bool IsState
=> _object is ActorState;
public readonly void SetItem(EquipItem item)
=> _editor.ChangeItem(_object, Slot, item, ApplySettings.Manual);

View file

@ -285,7 +285,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(equipDrawData);
}
else
else if (equipDrawData.IsState)
{
_advancedDyes.DrawButton(equipDrawData.Slot);
}
@ -309,7 +309,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(mainhand);
}
else
else if (mainhand.IsState)
{
_advancedDyes.DrawButton(EquipSlot.MainHand);
}
@ -331,7 +331,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(offhand);
}
else
else if (offhand.IsState)
{
_advancedDyes.DrawButton(EquipSlot.OffHand);
}
@ -365,7 +365,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(equipDrawData);
}
else
else if (equipDrawData.IsState)
{
_advancedDyes.DrawButton(equipDrawData.Slot);
}
@ -402,7 +402,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(mainhand);
}
else
else if (mainhand.IsState)
{
_advancedDyes.DrawButton(EquipSlot.MainHand);
}
@ -432,7 +432,7 @@ public class EquipmentDrawer
ImGui.SameLine();
DrawApplyStain(offhand);
}
else
else if (mainhand.IsState)
{
_advancedDyes.DrawButton(EquipSlot.OffHand);
}

View file

@ -10,7 +10,7 @@ using Penumbra.String;
namespace Glamourer.Interop;
public unsafe class InventoryService : IDisposable, IRequiredService
public sealed unsafe class InventoryService : IDisposable, IRequiredService
{
private readonly MovedEquipment _movedItemsEvent;
private readonly EquippedGearset _gearsetEvent;