2022-09-06 00:28:23 +10:00
|
|
|
using Content.Client.Eui;
|
2023-04-29 15:16:24 +12:00
|
|
|
using Content.Shared.Eui;
|
2022-09-06 00:28:23 +10:00
|
|
|
|
|
|
|
|
namespace Content.Client.NPC;
|
|
|
|
|
|
|
|
|
|
public sealed class NPCEui : BaseEui
|
|
|
|
|
{
|
|
|
|
|
private NPCWindow? _window = new();
|
|
|
|
|
|
|
|
|
|
public override void Opened()
|
|
|
|
|
{
|
|
|
|
|
base.Opened();
|
|
|
|
|
_window = new NPCWindow();
|
|
|
|
|
_window.OpenCentered();
|
2023-04-29 15:16:24 +12:00
|
|
|
_window.OnClose += OnClosed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnClosed()
|
|
|
|
|
{
|
|
|
|
|
SendMessage(new CloseEuiMessage());
|
2022-09-06 00:28:23 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Closed()
|
|
|
|
|
{
|
|
|
|
|
base.Closed();
|
|
|
|
|
_window?.Close();
|
|
|
|
|
_window = null;
|
|
|
|
|
}
|
|
|
|
|
}
|