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"
TurnLabelFormatProp<string>"Turn {0}"
PhaseProp<string>"deployment"
PhaseLabelProp<string>"Deployment"
IsPlayerTurnProp<bool>true
ActiveActionProp<string>""
ShowResultProp<bool>false
ResultTextProp<string>""
ActionHintProp<string>""
HintVariantProp<string>"info"
LockedProp<bool>false
WaitingProp<bool>false
WaitingTextProp<string>"Waiting for opponent…"
InputLockedProp<bool>false
ResultOutcomeProp<string>"victory"
ResultDockedProp<bool>false
ResultStagedProp<bool>false
ResultEnteringProp<bool>false
ResultViewProp<string>"panel"
HudPresetIdProp<string>SusHudPresetRegistry.Tactical
ContinueTextProp<string>"Continue"
ObjectivesTitleProp<string>"Objectives"
DefaultObjectivesProp<List<string>>new List<string> { "Deploy units", "Complete the mission" }

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-flow-panel
  • sus-game-session-action-btn
  • sus-game-session-screen
  • sus-game-session-screen__hint
  • sus-game-session-screen__phase-dot
  • sus-game-session-screen__phase-dot--deploy
  • sus-game-session-screen__phase-dot--enemy
  • sus-game-session-screen__phase-dot--loot
  • sus-game-session-screen__phase-dot--player
  • sus-game-session-screen__phase-dot--wait
  • sus-game-session-screen__phase-label
  • sus-game-session-screen__quit-btn
  • sus-game-session-screen__result
  • sus-game-session-screen__result--docked
  • sus-game-session-screen__result--match
  • sus-game-session-screen__result-dim
  • sus-game-session-screen__result-glow
  • sus-game-session-screen__result-glow--core
  • sus-game-session-screen__result-panel
  • sus-game-session-screen__turn-label
  • sus-game-session-screen__waiting
  • sus-game-session-screen__waiting--open
  • sus-game-session-screen__waiting-text
  • sus-game-session-screen__waiting-track
  • sus-input-lock
  • sus-match-result__expand
  • 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 follows TurnLabelFormat until you write your own label
TurnLabelFormatTurn chip format, {0} = TurnNumber. Default "Turn {0}"
Phase / PhaseLabelPhase chip label
ActionHintChrome hint alert; empty → hidden
ShowResult / ResultTextResult overlay visibility + copy
ResultView"panel" (default) or "match" (see below)
ContinueTextLabel of ResultOkBtn. Default "Continue"
WaitingTextWaiting banner text. Default "Waiting for opponent…"
ObjectivesTitle / DefaultObjectivesCaption and starting rows of the preset's objective panel
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)
MatchResult / ReconnectOverlay / TurnBannerBuilt-in parts (see their pages)
QuitBtn / ResultOkBtn / ActionBarHost wiring
ApplyHudPreset(id)Re-apply assembler + rebuild session chrome
SetPhaseAliases(map) / CanonicalPhase(phase)Map your own phase names onto the styled phase keys
ShowReconnect(deadlineSeconds, text) / ShowReconnectFailed(onRetry, onLeave, text)Reconnect overlay with a deadline / with retry and leave

Result view ​

ResultView = "panel" (default) keeps the plain result panel: a label and ResultOkBtn. ResultView = "match" shows the match result card instead and moves the same ResultOkBtn instance (name, classes and click handler intact) to the front of the card's action row; switching back to "panel" moves it home. Any other value counts as "panel".

csharp
session.ResultView.Value = "match";
session.MatchResult.Title.Value = "Victory";
session.MatchResult.DockText.Value = "Collect loot"; // secondary action: fold the card into the side panel
session.ShowResult.Value = true;

Pressing the DockText button sets ResultDocked = true. The overlay root gets sus-game-session-screen__result--match in match view.

When the content runs inside SusGameSessionScreen, its ShowVictory(details), ShowDefeat(details) and ShowDraw(details) fill the card in match view: MatchResult.Title gets the translated outcome line the panel shows by default ("Victory!", "Defeat", "Draw"; it follows the locale), MatchResult.Reason gets details as is (empty hides the line), and ResultOutcome becomes victory, defeat or draw. A Title or Reason you wrote yourself is never overwritten, so in the example above your "Victory" stays. The kicker, SetSummary, SetGrowth and SetRank stay yours. A result shown in panel view carries over to the card when you switch ResultView to "match".

Phase aliases ​

The phase chip is styled by a small set of phase keys: player, enemy, wait, deploy, loot. If your game uses its own phase names, map them once instead of renaming them:

csharp
session.SetPhaseAliases(new Dictionary<string, string>
{
    ["combat"] = "player",
    ["turn-pending"] = "wait",
});

The phase is looked up in the map first, then matched against the keys; a phase that is in neither keeps the neutral look. A new map replaces the previous one, null or empty clears it, and the current Phase is restyled at once. No synonyms are built in. The router screen SusGameSessionScreen has the same SetPhaseAliases.

Reconnect ​

ShowReconnect(deadlineSeconds) shows the reconnecting state with a countdown, and ShowReconnectFailed(onRetry, onLeave) shows the failed state with two actions. Both forward to the built-in reconnect overlay, where OnDeadline, TimerFormat and the button texts live.

Localized strings ​

The default texts of this screen (turn format, phase, waiting banner, continue button, objectives) and of the router screen SusGameSessionScreen (quit button, result lines, phase names) go through the SusGame String Table. A value you set yourself always wins. See Localized strings.

On the router screen, the resultLabel route prop is applied only when the route sets it; otherwise the button text comes from ContinueText and its translation.

Notes ​

  • Default preset = SusHudPresetRegistry.Deployment. Empty id falls back to Tactical.
  • ApplyHudPreset seeds the objective panel with DefaultObjectives (Deploy units / Complete the mission) until the host calls ObjectivePanel.SetObjectives — replace them for real missions.
  • Session chrome expects a session-chrome custom host from the preset; otherwise mounts into TL.

Replacing custom workarounds ​

If your project rebuilt parts of this screen by hand, switch to the built-in API:

Custom workaroundBuilt-in API
Write the result button text after the overlay showsContinueText (the resultLabel route prop only when set)
Translate "Turn N", turn buttons, banner and reconnect texts yourselfTurnLabelFormat and the text props of the HUD parts, all in the SusGame table
Hide the old result panel, move its button, fill the expand button iconResultView = "match", MatchResult.DockText, default ExpandIcon
Your own reconnect timer and progressShowReconnect(deadlineSeconds), ShowReconnectFailed(onRetry, onLeave), overlay TimerFormat / OnDeadline
Map your phase names to your own style keysSetPhaseAliases(map)