Files
tbd-station-14/Content.Client/Administration/UI/Bwoink/BwoinkWindow.xaml.cs
nikthechampiongr 9dc9e22d13 Bwoink fix (#28899)
* Fix incorrect usage of loc string

* Make it so you can no longer ahelp someone who is no longer selected
2024-06-15 04:25:42 -07:00

37 lines
1.0 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.PopulateList();
}
}
}