Reference Index

This commit is contained in:
Zeffuro
2025-12-30 22:42:16 +01:00
parent 200c430f8f
commit c15ddc8342
3 changed files with 9 additions and 4 deletions
@@ -2,6 +2,7 @@ using System;
using System.Linq;
using System.Numerics;
using AetherBags.Configuration;
using AetherBags.Nodes.Input;
using FFXIVClientStructs.FFXIV.Component.GUI;
using KamiToolKit.Nodes;
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using FFXIVClientStructs.FFXIV.Component.GUI;
using KamiToolKit.Nodes;
namespace AetherBags.Nodes;
namespace AetherBags.Nodes.Input;
public class LabeledDropdownNode : SimpleComponentNode {
private readonly GridNode _gridNode;
@@ -224,7 +224,10 @@ public class InventoryCategoryNode : SimpleComponentNode
InventoryItem item = data.Item;
InventoryMappedLocation visualLocation = data.VisualLocation;
bool useVisualLocation = item.Container.IsMainInventory;
int startIndex = item.Container.GetInventoryStartIndex;
int absoluteIndex = startIndex + visualLocation.Slot;
bool useVisualLocation = true;
bool isSlotBlocked = item.Container.IsMainInventory && data.IsSlotBlocked;
float alpha = !isSlotBlocked && data.IsEligibleForContext ? 1.0f : 0.4f;
@@ -241,6 +244,7 @@ public class InventoryCategoryNode : SimpleComponentNode
Type = DragDropType.Item,
Int1 = useVisualLocation ? visualLocation.Container : (int)item.Container,
Int2 = useVisualLocation ? visualLocation.Slot : item.Slot,
ReferenceIndex = (short)absoluteIndex,
},
IsClickable = true,
OnDiscard = node => OnDiscard(node, data),