Files
tbd-station-14/Content.Client/Ghost/Roles/UI/GhostRolesWindow.xaml.cs
Visne 610ff0083f Ghost UI to XAML and minor cleanup (#4637)
* Remove unused class, clean up XAML

* Move GhostGui.cs into UI folder and namespace

* GhostTargetWindow to seperate file

* GhostTargetWindow to XAML

* Center request button

* Improve UI, localisation
2021-09-21 13:03:14 +10:00

26 lines
700 B
C#

using System;
using Content.Shared.Ghost.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
namespace Content.Client.Ghost.Roles.UI
{
[GenerateTypedNameReferences]
public partial class GhostRolesWindow : SS14Window
{
public event Action<uint>? RoleRequested;
public void ClearEntries()
{
NoRolesMessage.Visible = true;
EntryContainer.DisposeAllChildren();
}
public void AddEntry(GhostRoleInfo info)
{
NoRolesMessage.Visible = false;
EntryContainer.AddChild(new GhostRolesEntry(info, _ => RoleRequested?.Invoke(info.Identifier)));
}
}
}