Namespace: GGG.Inventory.UI
Describes the outcome of an inventory drag-and-drop operation.
public readonly struct InventoryDragDropResult
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
InventoryDragDropResult(InventoryDragDropOperation, bool, int, int, ItemInstance, IReadOnlyList<ItemInstance>)
Creates a new InventoryDragDropResult instance.
public InventoryDragDropResult(InventoryDragDropOperation operation, bool succeeded, int sourceSlotIndex = -1, int destinationSlotIndex = -1, ItemInstance item = null, IReadOnlyList<ItemInstance> removedItems = null)
Parameters
operation InventoryDragDropOperation
The drag-and-drop operation category.
succeeded bool
Whether the operation succeeded.
sourceSlotIndex int
The zero-based source slot index.
destinationSlotIndex int
The zero-based destination slot index.
item ItemInstance
The runtime item instance to inspect or modify.
removedItems IReadOnlyList<ItemInstance>
Receives the removed runtime item instances when successful.
Properties
DestinationSlotIndex
Gets the destination inventory slot index for this operation.
public int DestinationSlotIndex { get; }
Property Value
Item
Gets the item.
public ItemInstance Item { get; }
Property Value
Operation
Gets the drag-and-drop operation category.
public InventoryDragDropOperation Operation { get; }
Property Value
RemovedItems
Gets the runtime items removed by this operation.
public IReadOnlyList<ItemInstance> RemovedItems { get; }
Property Value
SourceSlotIndex
Gets the source inventory slot index for this operation.
public int SourceSlotIndex { get; }
Property Value
Succeeded
Gets whether the attempted operation succeeded.
public bool Succeeded { get; }