2021-01-03 17:20:17 +01:00
|
|
|
|
using Content.Client.Eui;
|
2021-06-09 22:19:39 +02:00
|
|
|
|
using Content.Shared.Cloning;
|
2021-01-03 17:20:17 +01:00
|
|
|
|
using JetBrains.Annotations;
|
2022-05-28 11:32:07 +10:00
|
|
|
|
using Robust.Client.Graphics;
|
2021-01-03 17:20:17 +01:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Client.Cloning.UI
|
2021-01-03 17:20:17 +01:00
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class AcceptCloningEui : BaseEui
|
2021-01-03 17:20:17 +01:00
|
|
|
|
{
|
|
|
|
|
|
private readonly AcceptCloningWindow _window;
|
|
|
|
|
|
|
|
|
|
|
|
public AcceptCloningEui()
|
|
|
|
|
|
{
|
|
|
|
|
|
_window = new AcceptCloningWindow();
|
|
|
|
|
|
|
|
|
|
|
|
_window.DenyButton.OnPressed += _ =>
|
|
|
|
|
|
{
|
|
|
|
|
|
SendMessage(new AcceptCloningChoiceMessage(AcceptCloningUiButton.Deny));
|
|
|
|
|
|
_window.Close();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-04-29 15:16:24 +12:00
|
|
|
|
_window.OnClose += () => SendMessage(new AcceptCloningChoiceMessage(AcceptCloningUiButton.Deny));
|
|
|
|
|
|
|
2021-01-03 17:20:17 +01:00
|
|
|
|
_window.AcceptButton.OnPressed += _ =>
|
|
|
|
|
|
{
|
|
|
|
|
|
SendMessage(new AcceptCloningChoiceMessage(AcceptCloningUiButton.Accept));
|
|
|
|
|
|
_window.Close();
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Opened()
|
|
|
|
|
|
{
|
2022-05-28 11:32:07 +10:00
|
|
|
|
IoCManager.Resolve<IClyde>().RequestWindowAttention();
|
2021-01-03 17:20:17 +01:00
|
|
|
|
_window.OpenCentered();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Closed()
|
|
|
|
|
|
{
|
|
|
|
|
|
_window.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|