Files
tbd-station-14/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs
Errant 3d9ce10f58 Revert "[HOTFIX] - Players with unknown playtimes now are tagged as new players" (#35639)
Revert "[HOTFIX] - Players with unknown playtimes now are tagged as new playe…"

This reverts commit 4dfd3e5740.
2025-03-03 07:49:13 +01:00

41 lines
1.1 KiB
C#

using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.Administration.UI.Bwoink
{
/// <summary>
/// This window connects to a BwoinkSystem channel. BwoinkSystem manages the rest.
/// </summary>
[GenerateTypedNameReferences]
public sealed partial class BwoinkWindow : DefaultWindow
{
public BwoinkWindow()
{
RobustXamlLoader.Load(this);
Bwoink.ChannelSelector.OnSelectionChanged += sel =>
{
if (sel is null)
{
Title = Loc.GetString("bwoink-title-none-selected");
return;
}
Title = $"{sel.CharacterName} / {sel.Username}";
if (sel.OverallPlaytime != null)
{
Title += $" | {Loc.GetString("generic-playtime-title")}: {sel.PlaytimeString}";
}
};
OnOpen += () =>
{
Bwoink.ChannelSelector.StopFiltering();
Bwoink.PopulateList();
};
}
}
}