SusReconnectOverlay

Mid-match connection-loss banner — a reconnecting progress track with a timer, switching to a failed state with retry and optional leave actions.
Package
SusGame · HUD (commercial)
SusGame · HUD
Props
| Name | Type | Default | |
|---|---|---|---|
Open | Prop<bool> | false | |
Failed | Prop<bool> | false | |
Kicker | Prop<string> | "CONNECTION LOST" | |
Text | Prop<string> | "Reconnecting…" | |
RetryText | Prop<string> | "RETRY" | |
LeaveText | Prop<string> | "Leave" | |
CanLeave | Prop<bool> | false | |
TimerFormat | Prop<string> | "{0}s" | |
Timer | Prop<string> | "" | |
Progress | Prop<float> | 0f |
Slots
Events
| Name | Field | Payload |
|---|---|---|
Deadline | OnDeadline | — |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-hiddensus-reconnectsus-reconnect__btnsus-reconnect__kickersus-reconnect__leavesus-reconnect__rowsus-reconnect__textsus-reconnect__timersus-reconnect__tracksus-reconnect--can-leavesus-reconnect--failedsus-reconnect--open
Usage
<sus:SusReconnectOverlay />overlay.OnDeadline = () => overlay.ShowFailed(onRetry: Reconnect, onLeave: BackToMenu);
overlay.ShowReconnect(deadlineSeconds: 30f);| Prop / API | Role |
|---|---|
Kicker / Text | Headline and message. Defaults "CONNECTION LOST", "Reconnecting…" |
RetryText / LeaveText | Button labels. Defaults "RETRY", "Leave" |
TimerFormat / Timer | Countdown format, {0} = whole seconds left (default "{0}s"), and the current text |
Progress | Time left, 1 → 0 |
ShowReconnect(deadlineSeconds, text) | Reconnecting state with a countdown |
ShowFailed(onRetry, onLeave, text) | Failed state with retry and leave |
ShowFailed(text) / Show(kicker, text) / Hide() | Earlier overloads, unchanged |
OnDeadline | Called once when the countdown runs out |
Btn / LeaveBtn | Retry and leave buttons |
Deadline
ShowReconnect(deadlineSeconds) counts down in unscaled time, so a paused game (timeScale = 0) still counts. When the time is up the countdown stops and OnDeadline is called; with no OnDeadline set, the overlay switches to the failed state by itself. A non-positive deadline is already up. With SusMotion.Reduce on, the bar steps once per second instead of sliding; the countdown itself still runs.
Retry and leave
ShowFailed(onRetry, onLeave) wires the retry button (Btn) to onRetry and the leave button (LeaveBtn, class sus-reconnect__leave) to onLeave, replacing their earlier click handlers. The leave button shows only when onLeave is not null.
The default texts go through the SusGame String Table; a value you set yourself wins. See Localized strings.