Add make ghost role verb (#3204)

This commit is contained in:
DrSmugleaf
2021-02-16 09:51:27 +01:00
committed by GitHub
parent 6a3072e4fd
commit 78afc2db0f
19 changed files with 388 additions and 20 deletions

View File

@@ -0,0 +1,29 @@
using System;
using Content.Shared.GameObjects.Components.Observer;
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;
protected override Vector2 CalculateMinimumSize() => (350, 275);
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)));
}
}
}