mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 03:10:55 +01:00
37 lines
840 B
C#
37 lines
840 B
C#
using Content.Shared.Security.Components;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Content.Client.Security.Ui;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class GenpopLockerBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
|
|
{
|
|
private GenpopLockerMenu? _menu;
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = new(Owner, EntMan);
|
|
|
|
_menu.OnConfigurationComplete += (name, time, crime) =>
|
|
{
|
|
SendPredictedMessage(new GenpopLockerIdConfiguredMessage(name, time, crime));
|
|
Close();
|
|
};
|
|
|
|
_menu.OnClose += Close;
|
|
_menu.OpenCentered();
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
if (!disposing)
|
|
return;
|
|
_menu?.Orphan();
|
|
_menu = null;
|
|
}
|
|
}
|
|
|