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

@@ -2,7 +2,6 @@ using Content.Shared.Chemistry;
using Content.Shared.Containers.ItemSlots;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
namespace Content.Client.Chemistry.UI
{
@@ -28,8 +27,13 @@ namespace Content.Client.Chemistry.UI
base.Open();
// Setup window layout/elements
_window = this.CreateWindow<ChemMasterWindow>();
_window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
_window = new ChemMasterWindow
{
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName,
};
_window.OpenCentered();
_window.OnClose += Close;
// Setup static button actions.
_window.InputEjectButton.OnPressed += _ => SendMessage(
@@ -71,5 +75,15 @@ namespace Content.Client.Chemistry.UI
_window?.UpdateState(castState); // Update window state
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
_window?.Dispose();
}
}
}
}