Skip to content

SusHudItemStrip

SusHudItemStrip

Consumable / quick-item row — icon + count per slot, arrow focus, activate callback.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
SlotCountProp<int>5

Slots

No slots.

Events

NameFieldPayload
ItemActivatedOnItemActivatedint

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-hud-item-strip
  • sus-hud-item-strip__count
  • sus-hud-item-strip__icon
  • sus-hud-item-strip__key
  • sus-hud-item-strip__slot

Usage

csharp
var strip = new SusHudItemStrip();
strip.SlotCount.Value = 5;
strip.OnItemActivated += index => { /* consume / equip */ };

strip.SetItem(0, "potion", "3");
strip.SetItem(1, "bandages", "12");
strip.SetItem(2, "flare", "1");
xml
<template>
  <sus:SusHudItemStrip :SlotCount="Slots.Value"
                       @item-activated="OnItemActivated" />
</template>

<script>
public Prop<int> Slots = new(5);
void OnItemActivated(int index) { /* … */ }
// Call SetItem after mount (slots rebuild on SlotCount).
</script>
Prop / APIRole
SlotCountSlots 1…12 (default 5)
SetItem(i, icon, countText?)Fill one slot
OnItemActivatedClick / activate index

Notes

  • Empty icons until SetItem — fill after mount like SusHotbar.
  • Keyboard: Left/Right move focus; activation via click (and host key wiring).
  • Prefer hotbar when you need digit keybinds + selection chrome; item strip is the denser count-badge row.