using Content.Shared.Ghost.Roles; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles { [GenerateTypedNameReferences] public sealed partial class GhostRolesWindow : DefaultWindow { public event Action? OnRoleRequested; public event Action? OnRoleFollow; public void ClearEntries() { NoRolesMessage.Visible = true; EntryContainer.DisposeAllChildren(); } public void AddEntry(string name, string description, IEnumerable roles) { NoRolesMessage.Visible = false; var entry = new GhostRolesEntry(name, description, roles); entry.OnRoleSelected += OnRoleRequested; entry.OnRoleFollow += OnRoleFollow; EntryContainer.AddChild(entry); } } }