Skip to content
Version 2.11.0
↓ Get the launcher

DragSlotElement record

Wraps a grid cell so it can be dragged onto another cell. Key identifies the cell (the CombatMeter uses the flat group*5+slot index). OnDrop fires on the grabbed cell when it is released over a different registered cell, as OnDrop(fromKey, toKey). CanDrag gates the whole interaction (e.g. leader-only); when it returns false the cell neither drags nor accepts drops. While dragging, a dimmed ghost of Child follows the cursor and the hovered target highlights. Renderer-neutral — no IMGUI tokens.

public record DragSlotElement : IEquatable<HudElement>
name description
DragSlotElement(…) Wraps a grid cell so it can be dragged onto another cell. Key identifies the cell (the CombatMeter uses the flat group*5+slot index). OnDrop fires on the grabbed cell when it is released over a different registered cell, as OnDrop(fromKey, toKey). CanDrag gates the whole interaction (e.g. leader-only); when it returns false the cell neither drags nor accepts drops. While dragging, a dimmed ghost of Child follows the cursor and the hovered target highlights. Renderer-neutral — no IMGUI tokens.
CanDrag { get; set; } Optional gate; null means always draggable.
Child { get; set; } The cell content (e.g. a MeterRowElement).
Key { get; set; } Stable identifier for this cell within its drag group.
OnDrop { get; set; } Callback invoked with (fromKey, toKey) on a valid drop.