mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Co-authored-by: plykiya <plykiya@protonmail.com> (cherry picked from commit d87d9c467626fab1d8f33da5949b16e9e8d120eb)
30 lines
845 B
C#
30 lines
845 B
C#
using Content.Shared.Ghost.Roles;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Client.Ghost;
|
|
|
|
public sealed class GhostRoleRadioBoundUserInterface : BoundUserInterface
|
|
{
|
|
private GhostRoleRadioMenu? _ghostRoleRadioMenu;
|
|
|
|
public GhostRoleRadioBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_ghostRoleRadioMenu = this.CreateWindow<GhostRoleRadioMenu>();
|
|
_ghostRoleRadioMenu.SetEntity(Owner);
|
|
_ghostRoleRadioMenu.SendGhostRoleRadioMessageAction += SendGhostRoleRadioMessage;
|
|
}
|
|
|
|
private void SendGhostRoleRadioMessage(ProtoId<GhostRolePrototype> protoId)
|
|
{
|
|
SendMessage(new GhostRoleRadioMessage(protoId));
|
|
}
|
|
}
|