Skip to content

SusLobbyScreenContent

SusLobbyScreenContent

Hub / lobby shell — back, title chip, tabs, empty alert, child-view host, Ready + Vs AI footer actions.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
TitleProp<string>"Hub"
EmptyTextProp<string>"No data"
CanActProp<bool>false
HasDataProp<bool>false
ActionLabelProp<string>"Ready"
SoloActionLabelProp<string>"Vs AI"

Slots

No slots.

Events

No public events.

Style hooks

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

  • sc-lobby-footer
  • sc-lobby-header
  • sus-lobby-screen
  • sus-lobby-screen__back-btn
  • sus-lobby-screen__child-view
  • sus-lobby-screen__content
  • sus-lobby-screen__empty-text
  • sus-lobby-screen__row
  • sus-lobby-screen__row-icon
  • sus-lobby-screen__row-label
  • sus-lobby-screen__row-value
  • sus-lobby-screen__rows
  • sus-lobby-screen__solo-action-btn
  • sus-lobby-screen__tabs
  • sus-lobby-screen__title
  • sus-lobby-screen--limbo

Usage

Bind chrome props; fill Tabs / ChildViewHost from host or child views. Gate footer with CanAct.

xml
<template>
  <sus:SusLobbyScreenContent
    :Title="Title.Value"
    :EmptyText="Empty.Value"
    :CanAct="Ready.Value"
    :ActionLabel="Act.Value"
    :SoloActionLabel="Solo.Value"
  />
</template>

<script>
public Prop<string> Title = new("Hub");
public Prop<string> Empty = new("No data");
public Prop<bool> Ready = new(false);
public Prop<string> Act = new("Ready");
public Prop<string> Solo = new("Vs AI");
</script>
csharp
var lobby = new SusLobbyScreenContent();
lobby.Title.Value = "Multiplayer";
lobby.EmptyText.Value = "No parties";
lobby.CanAct.Value = true;
lobby.ActionLabel.Value = "Ready";
lobby.SoloActionLabel.Value = "Vs AI";
// After mount:
lobby.Tabs.Items.Value = new List<SusTabs.TabItem> {
  new() { Title = "Parties", Value = "parties" },
  new() { Title = "Friends", Value = "friends" },
};
lobby.ChildViewHost.Add(myListView);
lobby.BackBtn.OnClick += () => { /* back */ };
lobby.ActionBtn.OnClick += () => { /* ready */ };
lobby.SoloActionBtn.OnClick += () => { /* vs AI */ };
Prop / APIRole
TitleHeader chip label
EmptyTextEmpty alert; empty string → hidden
CanActEnables/disables both footer buttons (Disabled = !CanAct)
ActionLabel / SoloActionLabelReady / Vs AI labels
HasDataDeclared Prop<bool>not wired to UI in current pin
BackBtn / Tabs / EmptyAlert / ActionBtn / SoloActionBtnHost wiring
ChildViewHostMount list/detail content here

Notes

  • USS modifiers --limbo exist on the root for transparent overlay hubs (add class from host).
  • Tabs start empty — host must set Items / Model.
  • HasData is extracted in API but unused by WireProps; drive empty state via EmptyText + host visibility.