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,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();
}
}
}