Files
OldThink/Content.Client/GameObjects/Components/Observer/GhostRoles/GhostRolesWindow.xaml.cs

27 lines
785 B
C#
Raw Normal View History

using System;
2021-02-16 09:51:27 +01:00
using Content.Shared.GameObjects.Components.Observer.GhostRoles;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Maths;
2021-02-16 09:51:27 +01:00
namespace Content.Client.GameObjects.Components.Observer.GhostRoles
{
[GenerateTypedNameReferences]
public partial class GhostRolesWindow : SS14Window
{
public event Action<uint> RoleRequested;
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)));
}
}
}