Skip to content

SusGameSessionScreenContent

SusGameSessionScreenContent

Full-bleed match shell — mounts SusHudRoot via HUD preset, session chrome (turn/phase/hint/quit), optional result overlay.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
TurnNumberProp<int>1
TurnLabelProp<string>"Turn 1"
PhaseProp<string>"deployment"
PhaseLabelProp<string>"Deployment"
IsPlayerTurnProp<bool>true
ActiveActionProp<string>""
ShowResultProp<bool>false
ResultTextProp<string>""
ActionHintProp<string>""
HudPresetIdProp<string>SusHudPresetRegistry.Tactical

Slots

No slots.

Events

No public events.

Style hooks

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

  • sc-gs-actionbar
  • sc-gs-result-overlay
  • sc-gs-topbar
  • sus-flow-hint
  • sus-flow-hint--flush
  • sus-game-session-action-btn
  • sus-game-session-screen
  • sus-game-session-screen__hint
  • sus-game-session-screen__phase-label
  • sus-game-session-screen__quit-btn
  • sus-game-session-screen__turn-label
  • sus-menu-button

Usage

Bind chrome props; change HudPresetId or call ApplyHudPreset to swap modules. Wire QuitBtn / ResultOkBtn from host.

xml
<template>
  <sus:SusGameSessionScreenContent
    :TurnNumber="Turn.Value"
    :TurnLabel="TurnLbl.Value"
    :Phase="PhaseId.Value"
    :PhaseLabel="PhaseLbl.Value"
    :ActionHint="Hint.Value"
    :ShowResult="ShowEnd.Value"
    :ResultText="Result.Value"
    :HudPresetId="Preset.Value"
  />
</template>

<script>
public Prop<int> Turn = new(1);
public Prop<string> TurnLbl = new("Turn 1");
public Prop<string> PhaseId = new("deployment");
public Prop<string> PhaseLbl = new("Deployment");
public Prop<string> Hint = new("");
public Prop<bool> ShowEnd = new(false);
public Prop<string> Result = new("");
public Prop<string> Preset = new(SusHudPresetRegistry.Deployment);
</script>
csharp
var session = new SusGameSessionScreenContent();
session.HudPresetId.Value = SusHudPresetRegistry.Tactical;
session.ApplyHudPreset(SusHudPresetRegistry.Tactical);
// After mount — AbilityBar / MinimapFrame / ObjectivePanel from HudMount
session.TurnNumber.Value = 3;
session.PhaseLabel.Value = "Action";
session.ActionHint.Value = "Select a unit";
session.ShowResult.Value = true;
session.ResultText.Value = "Victory";
session.QuitBtn.OnClick += () => { /* confirm quit */ };
session.ResultOkBtn.OnClick += () => { /* dismiss result */ };
Prop / APIRole
TurnNumber / TurnLabelTurn chip (TurnLabel wins if non-empty)
Phase / PhaseLabelPhase chip label
ActionHintChrome hint alert; empty → hidden
ShowResult / ResultTextResult overlay visibility + copy
HudPresetIdTriggers ApplyHudPreset on change
IsPlayerTurn / ActiveActionDeclared Prop<> — not wired to chrome UI in current pin
HudRoot / HudMountRoot + last SusHudAssembler.Apply result
AbilityBar / MinimapFrame / ObjectivePanelRefs from mount (may be null by preset)
QuitBtn / ResultOkBtn / ActionBarHost wiring
ApplyHudPreset(id)Re-apply assembler + rebuild session chrome

Notes

  • Default preset = SusHudPresetRegistry.Deployment. Empty id falls back to Tactical.
  • ApplyHudPreset seeds demo objectives (Deploy units / Complete the mission) on the mounted panel — replace from host for real missions.
  • Session chrome expects a session-chrome custom host from the preset; otherwise mounts into TL.