Skip to content

SusBuffTray

SusBuffTray

Compact status-icon row — buff/debuff icons with optional stack badges.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
MaxVisibleProp<int>8

Slots

No slots.

Events

NameFieldPayload
BuffClickedOnBuffClickedint

Style hooks

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

  • sus-buff-tray
  • sus-buff-tray__buff
  • sus-buff-tray__icon
  • sus-buff-tray__stacks

Usage

Fill from code with SetBuffs / AddBuff. XML only caps visible count.

csharp
var tray = new SusBuffTray();
tray.MaxVisible.Value = 8;
tray.OnBuffClicked += index => { /* open detail */ };

tray.SetBuffs(new List<(string icon, string stacks)>
{
    ("flame", "3"),
    ("shield", ""),
    ("poison", "2"),
});
xml
<template>
  <sus:SusBuffTray :MaxVisible="Max.Value"
                   @buff-clicked="OnBuffClicked" />
</template>

<script>
public Prop<int> Max = new(8);
void OnBuffClicked(int index) { /* … */ }
// Call SetBuffs / AddBuff / ClearBuffs from status code.
</script>
Prop / APIRole
MaxVisibleCap on icons (default 8)
SetBuffs(list)Replace all icons (icon, stacks)
AddBuff(icon, stacks)Append until cap
ClearBuffs()Remove all
OnBuffClickedIndex of clicked buff

Notes

  • Empty until SetBuffs / AddBuff — intentional for identity shots with demo data.
  • Stacks string is optional; empty hides the badge.
  • Pair with SusStatusEffect when you need a richer single-effect chip.