2021-02-12 04:35:56 +01:00
|
|
|
using System;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Ghost.Roles;
|
2021-02-12 04:35:56 +01:00
|
|
|
using Robust.Client.AutoGenerated;
|
|
|
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Client.Ghost.Roles.UI
|
2021-02-12 04:35:56 +01:00
|
|
|
{
|
|
|
|
|
[GenerateTypedNameReferences]
|
|
|
|
|
public partial class GhostRolesWindow : SS14Window
|
|
|
|
|
{
|
2021-03-10 14:48:29 +01:00
|
|
|
public event Action<uint>? RoleRequested;
|
2021-02-12 04:35:56 +01:00
|
|
|
|
|
|
|
|
public void ClearEntries()
|
|
|
|
|
{
|
|
|
|
|
EntryContainer.DisposeAllChildren();
|
|
|
|
|
NoRolesMessage.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddEntry(GhostRoleInfo info)
|
|
|
|
|
{
|
|
|
|
|
NoRolesMessage.Visible = false;
|
|
|
|
|
EntryContainer.AddChild(new GhostRolesEntry(info, _ => RoleRequested?.Invoke(info.Identifier)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|