Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"
This reverts commit cbf329a82d.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Shared.Lathe;
|
||||
using Content.Shared.Research.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.Lathe.UI
|
||||
{
|
||||
@@ -18,9 +17,9 @@ namespace Content.Client.Lathe.UI
|
||||
{
|
||||
base.Open();
|
||||
|
||||
_menu = this.CreateWindow<LatheMenu>();
|
||||
_menu.SetEntity(Owner);
|
||||
_menu.OpenCenteredRight();
|
||||
_menu = new LatheMenu(this);
|
||||
_menu.OnClose += Close;
|
||||
|
||||
|
||||
_menu.OnServerListButtonPressed += _ =>
|
||||
{
|
||||
@@ -31,6 +30,8 @@ namespace Content.Client.Lathe.UI
|
||||
{
|
||||
SendMessage(new LatheQueueRecipeMessage(recipe, amount));
|
||||
};
|
||||
|
||||
_menu.OpenCenteredRight();
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
@@ -49,5 +50,13 @@ namespace Content.Client.Lathe.UI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user