SusEquipmentPanel

Equipment column — rebuilds SusEquipmentSlot children from InventoryModel.EquipmentSlots, groups or stacks by arrange mode.
Package
SusGame · Inventory (commercial)
Props
No public props.
Slots
No slots.
Events
| Name | Field | Payload |
|---|---|---|
SlotClick | OnSlotClick | string |
SlotItemClicked | OnSlotItemClicked | SusInventoryItem, string |
SlotItemDragStart | OnSlotItemDragStart | SusInventoryItem, string |
SlotItemDragEnd | OnSlotItemDragEnd | SusInventoryItem |
SlotItemDragging | OnSlotItemDragging | SusInventoryItem, Vector2 |
SlotContextAction | OnSlotContextAction | string, SusInventoryItem |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-equipment-panelsus-equipment-panel__group-labelsus-equipment-panel__group-rowsus-equipment-panel__slots-rowsus-equipment-panel__slots-row--chunksus-equipment-panel--rowssus-equipment-panel--stacksus-equipment-slot
Usage
Prefer parent SusInventory via SusInventorySession — the shell mounts and syncs the panel. Standalone: assign Model, then Rebuild / SyncSlots.
csharp
var panel = new SusEquipmentPanel();
panel.Model = model;
panel.CellSize = 48f;
panel.ItemMedia = "image"; // image | icon
panel.CellLayout = "grid"; // grid | slots
panel.ColumnFilter = "right"; // null = all; left | right | center
panel.Arrange = "groups"; // groups | stack
panel.ShowGroupLabels = true;
panel.IconResolver = myResolver;
panel.OnSlotClick += slotId => { /* unequip / flyout */ };
panel.OnSlotItemClicked += (item, slotId) => { /* select */ };
panel.Rebuild();xml
<template>
<sus:SusEquipmentPanel />
</template>
<script>
// No Prop<> on the panel — drive Model / Arrange / ColumnFilter from C#.
// Wire OnSlot* after mount; call Rebuild when EquipmentSlots change.
</script>| Prop / API | Role |
|---|---|
Model | Source of EquipmentSlots + ItemDefs |
CellSize / ItemMedia / CellLayout | Forwarded to each slot |
ColumnFilter | left / right / center or null (all) |
Arrange | groups (labeled wrap) | stack (paper-doll column) |
ShowGroupLabels | Hide SlotGroup labels when false |
Rebuild() / SyncSlots() | Full rebuild vs equip state sync |
HighlightSlots / HighlightDropTarget / ClearSlotHighlight | DnD preview |
OnSlotClick / OnSlotItem* / OnSlotContextAction | Slot & item events |
Notes
- Empty until
Model.EquipmentSlotsis set andRebuildruns (Mounted calls Rebuild once). - Prefer the panel over hand-wiring many SusEquipmentSlot instances when you need shared DnD / highlight.
- Shell hosts: bag side = full panel; loadout = left weapons (
ColumnFilter=left,Arrange=stack) + right armor.