Keep PlayerTab entries until the end of the round (#5910)
This commit is contained in:
@@ -52,7 +52,8 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
|
||||
PlayerList.AddChild(new PlayerTabEntry("Username",
|
||||
"Character",
|
||||
"Antagonist",
|
||||
new StyleBoxFlat(altColor)));
|
||||
new StyleBoxFlat(altColor),
|
||||
true));
|
||||
PlayerList.AddChild(new HSeparator());
|
||||
|
||||
var useAltColor = false;
|
||||
@@ -61,7 +62,8 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
|
||||
var entry = new PlayerTabEntry(player.Username,
|
||||
player.CharacterName,
|
||||
player.Antag ? "YES" : "NO",
|
||||
new StyleBoxFlat(useAltColor ? altColor : defaultColor));
|
||||
new StyleBoxFlat(useAltColor ? altColor : defaultColor),
|
||||
player.Connected);
|
||||
entry.PlayerUid = player.EntityUid;
|
||||
entry.OnPressed += args => OnEntryPressed?.Invoke(args);
|
||||
PlayerList.AddChild(entry);
|
||||
|
||||
@@ -11,11 +11,13 @@ public partial class PlayerTabEntry : ContainerButton
|
||||
{
|
||||
public EntityUid? PlayerUid;
|
||||
|
||||
public PlayerTabEntry(string username, string character, string antagonist, StyleBox styleBox)
|
||||
public PlayerTabEntry(string username, string character, string antagonist, StyleBox styleBox, bool connected)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
UsernameLabel.Text = username;
|
||||
if (!connected)
|
||||
UsernameLabel.StyleClasses.Add("Disabled");
|
||||
CharacterLabel.Text = character;
|
||||
AntagonistLabel.Text = antagonist;
|
||||
BackgroundColorPanel.PanelOverride = styleBox;
|
||||
|
||||
Reference in New Issue
Block a user