Skip to content

SusDialogueBox

SusDialogueBox

Dialogue molecule — speaker, portrait, SusTextFx reveal (Instant/PerChar/Vertex), choices, and UI cues; game owns the dialogue graph, kit owns the presentation.

Package

SusKit · Molecules (commercial)

Open in Playground

SusKit · Molecules

Props

NameTypeDefault
RevealProp<string>"Instant"
CharsPerSecondProp<float>30f
AutoAdvanceSecondsProp<float>0f
BlipMinIntervalMsProp<float>45f

Slots

No slots.

Events

NameFieldPayload
AdvanceOnAdvance
ChoiceOnChoicestring
CompletedOnCompleted

Style hooks

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

  • sus-dialogue-box
  • sus-dialogue-box__body
  • sus-dialogue-box__choice
  • sus-dialogue-box__choices
  • sus-dialogue-box__choices--empty
  • sus-dialogue-box__chrome
  • sus-dialogue-box__continue
  • sus-dialogue-box__continue--hidden
  • sus-dialogue-box__continue-hint
  • sus-dialogue-box__header
  • sus-dialogue-box__portrait
  • sus-dialogue-box__portrait--empty
  • sus-dialogue-box__speaker
  • sus-dialogue-box__speaker--empty
  • sus-dialogue-box__text
  • sus-dialogue-box--hidden

Usage

Presentation only — feed lines from your own dialogue graph. Reveal rides SusTextFx.Reveal01 (no second ticker). Open/Close/Confirm cues fire through the UI audio profile; per-glyph blips use PlayCustom("dialogue.blip").

csharp
var box = new SusDialogueBox();
box.Reveal.Value = "PerChar"; // Instant | PerChar | Vertex
box.CharsPerSecond.Value = 30f;
box.Show(new SusDialogueLine(
    "Captain",
    "We jump in <wave>three</wave>…",
    portrait: null,
    choices: new[]
    {
        new SusDialogueChoice("go", "Jump now"),
        new SusDialogueChoice("wait", "Hold"),
    }));
box.OnChoice = id => { /* branch */ };
box.OnAdvance = () => { /* next line when no choices */ };
// box.Advance(); box.Skip(); box.Hide();
Prop / APIRole
RevealInstant / PerChar / Vertex
CharsPerSecondReveal speed for PerChar/Vertex
AutoAdvanceSecondsAfter reveal, wait then Advance() (0 = manual only)
BlipMinIntervalMsThrottle for dialogue.blip
Show(line) / Advance() / Skip() / Hide()Line lifecycle
OnAdvance / OnChoice / OnCompletedHost hooks

Notes

  • Storybook story Dialogue Box (dialogue-box).
  • Hub shot kit-dialogue-box.png — showcase, captured live from Play mode.