Show total playtime in player list and AHelp window (#20980)
This commit is contained in:
@@ -120,9 +120,11 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
|
||||
player.StartingJob,
|
||||
player.Antag ? "YES" : "NO",
|
||||
new StyleBoxFlat(useAltColor ? _altColor : _defaultColor),
|
||||
player.Connected);
|
||||
player.Connected,
|
||||
player.PlaytimeString());
|
||||
entry.PlayerEntity = player.NetEntity;
|
||||
entry.OnPressed += args => OnEntryPressed?.Invoke(args);
|
||||
entry.ToolTip = Loc.GetString("player-tab-entry-tooltip");
|
||||
PlayerList.AddChild(entry);
|
||||
|
||||
useAltColor ^= true;
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
SizeFlagsStretchRatio="2"
|
||||
HorizontalExpand="True"
|
||||
ClipText="True"/>
|
||||
<Label Name="OverallPlaytimeLabel"
|
||||
SizeFlagsStretchRatio="2"
|
||||
HorizontalExpand="True"
|
||||
ClipText="True"/>
|
||||
</BoxContainer>
|
||||
</ContainerButton>
|
||||
|
||||
@@ -10,7 +10,7 @@ public sealed partial class PlayerTabEntry : ContainerButton
|
||||
{
|
||||
public NetEntity? PlayerEntity;
|
||||
|
||||
public PlayerTabEntry(string username, string character, string identity, string job, string antagonist, StyleBox styleBox, bool connected)
|
||||
public PlayerTabEntry(string username, string character, string identity, string job, string antagonist, StyleBox styleBox, bool connected, string overallPlaytime)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
@@ -23,5 +23,6 @@ public sealed partial class PlayerTabEntry : ContainerButton
|
||||
CharacterLabel.Text += $" [{identity}]";
|
||||
AntagonistLabel.Text = antagonist;
|
||||
BackgroundColorPanel.PanelOverride = styleBox;
|
||||
OverallPlaytimeLabel.Text = overallPlaytime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,11 @@
|
||||
ClipText="True"
|
||||
Text="{Loc player-tab-antagonist}"
|
||||
MouseFilter="Pass"/>
|
||||
<Label Name="PlaytimeLabel"
|
||||
SizeFlagsStretchRatio="2"
|
||||
HorizontalExpand="True"
|
||||
ClipText="True"
|
||||
Text="{Loc player-tab-playtime}"
|
||||
MouseFilter="Pass"/>
|
||||
</BoxContainer>
|
||||
</ContainerButton>
|
||||
|
||||
Reference in New Issue
Block a user