Files
tbd-station-14/Content.Client/GameObjects/Components/Observer/GhostRoles/GhostRolesWindow.xaml.cs
DrSmugleaf 902aa128c2 Enable nullability in Content.Client (#3257)
* Enable nullability in Content.Client

* Remove #nullable enable

* Merge fixes

* Remove Debug.Assert

* Merge fixes

* Fix build

* Fix build
2021-03-10 14:48:29 +01:00

27 lines
786 B
C#

using System;
using Content.Shared.GameObjects.Components.Observer.GhostRoles;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Maths;
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)));
}
}
}