Skip to content

SusHudRoot

SusHudRoot

Full-bleed HUD shell — seven absolute zones (top / tl / tr / center / bl / br / bottom) for chrome modules.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
DimmedProp<bool>false

Slots

Name
top
tl
tr
center
l
r
bl
br
bottom

Events

No public events.

Style hooks

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

  • sus-hud-root
  • sus-hud-root__ability-scroll
  • sus-hud-root__bottom-chrome
  • sus-hud-root__bottom-chrome-center
  • sus-hud-root__bottom-chrome-left
  • sus-hud-root__bottom-chrome-right
  • sus-hud-root__zone
  • sus-hud-root__zone--bl
  • sus-hud-root__zone--bottom
  • sus-hud-root__zone--br
  • sus-hud-root__zone--center
  • sus-hud-root__zone--l
  • sus-hud-root__zone--r
  • sus-hud-root__zone--tl
  • sus-hud-root__zone--top
  • sus-hud-root__zone--tr
  • sus-hud-root--dim
  • sus-scroll
  • sus-slot

Usage

Compose with named slots in XML, or mount widgets from code with MountIn.

csharp
var root = new SusHudRoot();
root.Dimmed.Value = false;
root.MountIn(SusHudZone.TL, new SusHudPlayerStatus());
root.MountIn(SusHudZone.Bottom, new SusAbilityBar());
root.MountIn(SusHudZone.BR, new SusHudTurnActions());
// root.ClearZones(); // wipe all zone children
xml
<template>
  <sus:SusHudRoot :Dimmed="Dim.Value">
    <template #top><!-- objective / banners --></template>
    <template #tl>
      <sus:SusHudPlayerStatus />
    </template>
    <template #tr>
      <sus:SusHudMenuButton />
    </template>
    <template #center><!-- toasts / confirm overlays --></template>
    <template #bl><!-- prompts --></template>
    <template #br>
      <sus:SusHudTurnActions />
    </template>
    <template #bottom>
      <sus:SusAbilityBar />
    </template>
  </sus:SusHudRoot>
</template>

<script>
public Prop<bool> Dim = new(false);
</script>
Prop / APIRole
DimmedAdds --dim overlay (rgba veil)
Slots top · tl · tr · center · bl · br · bottomZone hosts
GetZone(SusHudZone)Resolve zone VisualElement
MountIn(zone, element)Append child into a zone
ClearZones()Clear all zone children

Notes

  • Root and empty zones use PickingMode.Ignore so map clicks pass through; interactive children keep default picking.
  • Zones are absolute flex shells — place modules via Assembler / SusHudModuleKind, or mount manually.
  • SusHudZone: Top, TL, TR, Center, BL, BR, Bottom.