Skip to content

SusProfileScreenContent

SusProfileScreenContent

Player profile panel — avatar, name/rank chips, wins/matches/K-D, friends list via SetFriends, edit gate.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
DisplayNameProp<string>"Player"
AvatarImageProp<string>""
AvatarStatusProp<string>""
LevelProp<int>1
XpProp<int>0
RankProp<string>"Recruit"
WinsProp<int>0
MatchesProp<int>0
KdProp<float>0f
CanEditProp<bool>true

Slots

No slots.

Events

NameFieldPayload
FriendClickedOnFriendClickedstring

Style hooks

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

  • sus-chip__text
  • sus-profile-screen
  • sus-profile-screen__friend
  • sus-profile-screen__friend-av
  • sus-profile-screen__friend-name
  • sus-profile-screen__friend-status
  • sus-profile-screen__friends
  • sus-profile-screen__id-col
  • sus-profile-screen__identity
  • sus-profile-screen__name
  • sus-profile-screen__rank
  • sus-profile-screen__rank-row
  • sus-profile-screen__stat
  • sus-profile-screen__stats
  • sus-profile-screen__top

Usage

Bind identity/stats props; push friends with SetFriends. Wire BackBtn / EditBtn / OnFriendClicked.

xml
<template>
  <sus:SusProfileScreenContent
    :DisplayName="Name.Value"
    :AvatarImage="AvatarImg.Value"
    :AvatarStatus="Status.Value"
    :Level="Lvl.Value"
    :Rank="Rank.Value"
    :Wins="Wins.Value"
    :Matches="Matches.Value"
    :Kd="Kd.Value"
    :CanEdit="Edit.Value"
  />
</template>

<script>
public Prop<string> Name = new("Player");
public Prop<string> AvatarImg = new("");
public Prop<string> Status = new("online");
public Prop<int> Lvl = new(1);
public Prop<string> Rank = new("Recruit");
public Prop<int> Wins = new(0);
public Prop<int> Matches = new(0);
public Prop<float> Kd = new(0f);
public Prop<bool> Edit = new(true);
</script>
csharp
var profile = new SusProfileScreenContent();
profile.DisplayName.Value = "Nova";
profile.Level.Value = 12;
profile.Rank.Value = "Veteran";
profile.Wins.Value = 40;
profile.Matches.Value = 55;
profile.Kd.Value = 1.25f;
profile.CanEdit.Value = true;
profile.SetFriends(new List<SusProfileScreenContent.FriendRow> {
  new() { Id = "u1", Name = "Ally", Status = "online" },
  new() { Id = "u2", Name = "Rival", Status = "offline" },
});
profile.OnFriendClicked += id => { /* open friend */ };
profile.BackBtn.OnClick += () => { /* back */ };
profile.EditBtn.OnClick += () => { /* edit flow */ };
Prop / APIRole
DisplayNameName chip + avatar text
AvatarImage / AvatarStatusAvatar image URL / status
Level / RankRank row chips
Wins / Matches / KdStat chips
XpDeclared Prop<int>not shown in UI in current pin
CanEditDisables EditBtn when false
SetFriends(List<FriendRow>)Rebuild friends rows (Id/Name/Status/AvatarIcon)
OnFriendClickedAction<string> (id or name)
BackBtn / EditBtn / FriendsHostHost wiring

Notes

  • Empty friends shows «No friends yet.» via EmptyFriends.
  • FriendRow.Status lowercased into avatar status; online also tints status label.
  • Present in SusGame pin — types are real (SusProfileScreenContent / nested FriendRow).