DragSlotElement constructor
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 DragSlotElement(HudElement Child, int Key, Action<int, int> OnDrop, Func<bool>? CanDrag = null)| parameter | description |
|---|---|
| Child | The cell content (e.g. a MeterRowElement). |
| Key | Stable identifier for this cell within its drag group. |
| OnDrop | Callback invoked with (fromKey, toKey) on a valid drop. |
| CanDrag | Optional gate; null means always draggable. |
See Also
Section titled “See Also”- record HudElement
- record DragSlotElement
- namespace Stellar.Abstractions.Services