Skip to content

SusLoadingScreenContent ​

SusLoadingScreenContent

Full-bleed loading — brand banner, spinner and/or linear bar, message + optional subline.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
BrandTextProp<string>""
MessageProp<string>"Loading..."
MessageKeyProp<string>""
MessageCountProp<string>""
SubMessageProp<string>""
ProgressProp<float>0f
ShowSpinnerProp<bool>true
SpinnerStyleProp<string>"circular"
VisibleProp<bool>true
MapProp<bool>false
MapPhaseProp<string>"search"
ShowBarProp<bool>true
RadarPlacementProp<string>"below"
RetryTextProp<string>"Retry"
TelemetryLayoutProp<string>"inline"
TelemetryReserveRowsProp<int>0
ErrorCountdownSecondsProp<int>20
ErrorCountdownTickMsProp<int>1000
BackdropProp<List<SusParallaxLayer>>[]from presets

Slots

No slots.

Events

No public events.

Style hooks ​

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

  • sus-brand__word
  • sus-loading-screen
  • sus-loading-screen__backdrop
  • sus-loading-screen__bar
  • sus-loading-screen__brand
  • sus-loading-screen__countdown
  • sus-loading-screen__countdown-fill
  • sus-loading-screen__countdown-num
  • sus-loading-screen__error
  • sus-loading-screen__error-btn
  • sus-loading-screen__error-text
  • sus-loading-screen__error-title
  • sus-loading-screen__indicator
  • sus-loading-screen__message
  • sus-loading-screen__message--swap
  • sus-loading-screen__message-count
  • sus-loading-screen__message-row
  • sus-loading-screen__radar
  • sus-loading-screen__segments
  • sus-loading-screen__sub
  • sus-loading-screen__sub-key
  • sus-loading-screen__sub-row
  • sus-loading-screen__sub-row--danger
  • sus-loading-screen__sub-row--live
  • sus-loading-screen__sub-row--ok
  • sus-loading-screen__sub-row--reserved
  • sus-loading-screen__sub-row--warn
  • sus-loading-screen__sub-rows
  • sus-loading-screen__sub-rows--columns
  • sus-loading-screen__sub-val
  • sus-loading-screen--visible

Usage ​

xml
<template>
  <sus:SusLoadingScreenContent
    :BrandText="Brand.Value"
    :Message="Msg.Value"
    :SubMessage="Sub.Value"
    :Progress="Prog.Value"
    :ShowSpinner="Spin.Value"
  />
</template>

<script>
public Prop<string> Brand = new("My Game");
public Prop<string> Msg = new("Loading...");
public Prop<string> Sub = new("");
public Prop<float> Prog = new(0.35f); // 0…1; <0 = indeterminate
public Prop<bool> Spin = new(true);
</script>
csharp
var loading = new SusLoadingScreenContent();
loading.BrandText.Value = "My Game";
loading.Message.Value = "Connecting…";
loading.SubMessage.Value = "Region EU";
loading.Progress.Value = 0.4f;   // shows linear bar
loading.Progress.Value = -1f;    // indeterminate → spinner if ShowSpinner
loading.ShowSpinner.Value = true;
Prop / APIRole
BrandTextTop banner; empty → hidden
MessagePrimary label
SubMessageSecondary label; empty → hidden
Progress0…1 → bar %; < 0 → indeterminate mode
ShowSpinnerWhen indeterminate, show circular spinner
BrandBannerBuilt banner host

Backdrop ​

Backdrop takes a list of SusParallaxLayer (picture, depth, optional USS class) and puts a SusParallaxStack behind the screen:

csharp
loading.Backdrop.Value = new List<SusParallaxLayer>
{
    new SusParallaxLayer(Background.FromTexture2D(sky), depth: 4f),
    new SusParallaxLayer(Background.FromTexture2D(skyline), depth: 14f),
};
  • Null or empty (default) creates nothing: the tree stays as before.
  • Set, it adds a first child sus-loading-screen__backdrop (absolute, ignores picking) holding the stack (BackdropHost / BackdropStack). Emptied again, the node is removed.
  • The stack follows the pointer over the whole screen, pauses while the application has no focus, and parks while SusMotion.Reduce is on.

The menu screen SusMenuScreen has the same Backdrop prop.

Indicator, map stage and radar ​

Every prop here defaults to the look you had before; new classes and nodes appear only when you set one.

PropValuesEffect
SpinnerStyle"circular" (default) | "spinner" | "dual"spinner / dual: a SusSpinner (size lg, Dual for dual) replaces the ring while Progress is negative; the ring is hidden by class
MapPhase"search" (default) | "map"map adds sus-loading-screen--map-stage while Map is on, so a skin can style the map stage apart from the search
ShowBartrue (default) | falsefalse hides the progress bar at any Progress
RadarPlacement"below" (default) | "above"above: the search radar stands right before the message
RetryText"Retry"Caption of the retry button of ShowError

While Progress is negative only the busy indicator shows: no empty progress bar under it. SearchRadar.Label set to "" hides the radar caption.

Telemetry rows ​

SetTelemetry(rows) updates the rows in place: a row is identified by its key (plus the repeat index of that key), keeps its element, and changes only its value and state class. New keys are inserted, missing keys are removed.

PropValuesEffect
TelemetryLayout"inline" (default) | "columns"columns (sus-loading-screen__sub-rows--columns): keys right-aligned and values left-aligned on one axis, so keys stay put when values change length
TelemetryReserveRows0 (default) or NAt least N rows; missing ones are hidden placeholders of the same height (__sub-row--reserved), so the block does not grow while rows arrive

Message phase and counter ​

PropEffect
MessageKeyEmpty (default): __message--swap on every Message change, as before. Set: the swap class only when the key changes
MessageCountA counter next to the message, e.g. "12/80". The first non-empty value builds __message-row + __message-count; a counter change never swaps
csharp
loading.MessageKey.Value = "assets";
loading.Message.Value = "Loading assets";
loading.MessageCount.Value = "12/80";   // later "13/80": no swap

SusLoadingFlowScreen exposes MessageKey and MessageCount; Reset() clears both.

Notes ​

  • Determinate path clamps Progress to 0…1 and maps to bar 0…100.
  • Indeterminate hides the bar; spinner visibility also needs ShowSpinner=true.
  • Distinct from kit MigratedLoadingScreen (different package / props).