Add job column to PlayerTab (#6181)

This commit is contained in:
ShadowCommander
2022-01-15 05:17:33 -08:00
committed by GitHub
parent d1a033644b
commit a3c1d8f22a
5 changed files with 20 additions and 6 deletions

View File

@@ -51,6 +51,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
PlayerList.AddChild(new PlayerTabEntry("Username",
"Character",
"Job",
"Antagonist",
new StyleBoxFlat(altColor),
true));
@@ -61,6 +62,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
{
var entry = new PlayerTabEntry(player.Username,
player.CharacterName,
player.StartingJob,
player.Antag ? "YES" : "NO",
new StyleBoxFlat(useAltColor ? altColor : defaultColor),
player.Connected);

View File

@@ -6,12 +6,17 @@
HorizontalExpand="True"
SeparationOverride="4">
<Label Name="UsernameLabel"
SizeFlagsStretchRatio="2"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<Label Name="CharacterLabel"
SizeFlagsStretchRatio="2"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>
<Label Name="JobLabel"
SizeFlagsStretchRatio="3"
HorizontalExpand="True"
ClipText="True"/>
<customControls:VSeparator/>

View File

@@ -11,13 +11,14 @@ public partial class PlayerTabEntry : ContainerButton
{
public EntityUid? PlayerUid;
public PlayerTabEntry(string username, string character, string antagonist, StyleBox styleBox, bool connected)
public PlayerTabEntry(string username, string character, string job, string antagonist, StyleBox styleBox, bool connected)
{
RobustXamlLoader.Load(this);
UsernameLabel.Text = username;
if (!connected)
UsernameLabel.StyleClasses.Add("Disabled");
JobLabel.Text = job;
CharacterLabel.Text = character;
AntagonistLabel.Text = antagonist;
BackgroundColorPanel.PanelOverride = styleBox;