Revert "Remove some BUI boilerplate" (#30214)

Revert "Remove some BUI boilerplate (#28399)"

This reverts commit cbf329a82d.
This commit is contained in:
Nemanja
2024-07-20 20:42:27 -04:00
committed by GitHub
parent 6d664c9157
commit cb0ba66be3
137 changed files with 1755 additions and 1096 deletions

View File

@@ -1,6 +1,5 @@
using Content.Shared.Singularity.Components;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
namespace Content.Client.ParticleAccelerator.UI
{
@@ -17,10 +16,9 @@ namespace Content.Client.ParticleAccelerator.UI
{
base.Open();
_menu = this.CreateWindow<ParticleAcceleratorControlMenu>();
_menu.OnOverallState += SendEnableMessage;
_menu.OnPowerState += SendPowerStateMessage;
_menu.OnScanPartsRequested += SendScanPartsMessage;
_menu = new ParticleAcceleratorControlMenu(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
public void SendEnableMessage(bool enable)
@@ -42,5 +40,13 @@ namespace Content.Client.ParticleAccelerator.UI
{
_menu?.DataUpdate((ParticleAcceleratorUIState) state);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_menu?.Dispose();
_menu = null;
}
}
}