Ensure EUIs close themselves (#15860)

This commit is contained in:
Leon Friedrich
2023-04-29 15:16:24 +12:00
committed by GitHub
parent 58300598e2
commit cedec8d415
34 changed files with 79 additions and 128 deletions

View File

@@ -1,6 +1,7 @@
using Content.Client.Eui;
using Content.Shared.Administration.BanList;
using Content.Shared.Eui;
using Content.Shared.Ghost.Roles;
namespace Content.Client.Administration.UI.BanList;
@@ -9,9 +10,21 @@ public sealed class BanListEui : BaseEui
public BanListEui()
{
BanWindow = new BanListWindow();
BanWindow.OnClose += OnClosed;
BanControl = BanWindow.BanList;
}
private void OnClosed()
{
SendMessage(new CloseEuiMessage());
}
public override void Closed()
{
base.Closed();
BanWindow.Close();
}
private BanListWindow BanWindow { get; }
private BanListControl BanControl { get; }