Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"
This reverts commit cbf329a82d.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Content.Shared.Construction.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.Construction.UI
|
||||
{
|
||||
@@ -18,8 +17,8 @@ namespace Content.Client.Construction.UI
|
||||
{
|
||||
base.Open();
|
||||
|
||||
_menu = this.CreateWindow<FlatpackCreatorMenu>();
|
||||
_menu.SetEntity(Owner);
|
||||
_menu = new FlatpackCreatorMenu(Owner);
|
||||
_menu.OnClose += Close;
|
||||
|
||||
_menu.PackButtonPressed += () =>
|
||||
{
|
||||
@@ -28,5 +27,14 @@ namespace Content.Client.Construction.UI
|
||||
|
||||
_menu.OpenCentered();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user