SusBuffTray

Compact status-icon row — buff/debuff icons with optional stack badges.
Package
SusGame · HUD (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
MaxVisible | Prop<int> | 8 |
Slots
No slots.
Events
| Name | Field | Payload |
|---|---|---|
BuffClicked | OnBuffClicked | int |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-buff-traysus-buff-tray__buffsus-buff-tray__iconsus-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 / API | Role |
|---|---|
MaxVisible | Cap on icons (default 8) |
SetBuffs(list) | Replace all icons (icon, stacks) |
AddBuff(icon, stacks) | Append until cap |
ClearBuffs() | Remove all |
OnBuffClicked | Index 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.