Skip to content

SusAbilitySlot

SusAbilitySlot

Single ability cell — icon, name, keybind, cooldown overlay, optional hold-to-cast.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
IconProp<string>""
LabelProp<string>""
DescriptionProp<string>""
KeybindProp<string>""
Cooldown01Prop<float>0f
CooldownTextProp<string>""
CooldownStyleProp<string>"Radial"
DisabledProp<bool>false
UseHoldProp<bool>false
HoldDurationMsProp<int>800

Slots

No slots.

Events

NameFieldPayload
ActivateOnActivate
HoldCompleteOnHoldComplete
HoldCancelOnHoldCancel

Style hooks

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

  • breakpoint-sm
  • sus-ability-slot
  • sus-ability-slot__cd
  • sus-ability-slot__cd-label
  • sus-ability-slot__cd-wipe
  • sus-ability-slot__hold-host
  • sus-ability-slot__icon-host
  • sus-ability-slot__key
  • sus-ability-slot__name
  • sus-ability-slot--disabled
  • sus-ability-slot--hold
  • sus-ability-slot--on-cd

Usage

csharp
var slot = new SusAbilitySlot();
slot.Icon.Value = "sword";
slot.Label.Value = "Strike";
slot.Description.Value = "Melee hit — 1 AP";
slot.Keybind.Value = "1";
slot.Cooldown01.Value = 0.4f;
slot.CooldownText.Value = "2s";
slot.Disabled.Value = false;
slot.UseHold.Value = false;
slot.OnActivate += () => { /* … */ };
xml
<template>
  <sus:SusAbilitySlot :Icon="Icon.Value"
                      :Label="Label.Value"
                      :Description="Desc.Value"
                      :Keybind="Key.Value"
                      :Cooldown01="Cd.Value"
                      :CooldownText="CdText.Value"
                      :Disabled="Disabled.Value"
                      :UseHold="Hold.Value"
                      :HoldDurationMs="HoldMs.Value"
                      @activate="OnActivate"
                      @hold-complete="OnHoldComplete"
                      @hold-cancel="OnHoldCancel" />
</template>

<script>
public Prop<string> Icon = new("sword");
public Prop<string> Label = new("Strike");
public Prop<string> Desc = new("Melee hit — 1 AP");
public Prop<string> Key = new("1");
public Prop<float> Cd = new(0.4f);
public Prop<string> CdText = new("2s");
public Prop<bool> Disabled = new(false);
public Prop<bool> Hold = new(false);
public Prop<int> HoldMs = new(800);
void OnActivate() { /* … */ }
void OnHoldComplete() { /* … */ }
void OnHoldCancel() { /* … */ }
</script>
PropRole
IconIcon name for inner SusIcon
LabelName under the icon
DescriptionTooltip body (with label)
KeybindCorner key text
Cooldown010 ready · 1 full remaining
CooldownTextOverlay label while on CD
DisabledBlocks activate / hold
UseHoldEmbeds SusHoldButton instead of click
HoldDurationMsHold length when UseHold

Notes

  • Cooldown class kicks in when Cooldown01 > 0.01.
  • Inside a bar, prefer SusAbilityBar SetAbilities — it writes these props for you.