* Remove some BUI boilerplate - The disposals overrides got removed due to the helper method handling it. - Replace window creation with CreateWindow helper. - Fixed some stinky code which would cause exceptions. * More * moar * weh * done * More BUIs * More updates * weh * moar * look who it is * weh * merge * weh * fixes
33 lines
821 B
C#
33 lines
821 B
C#
using Content.Shared.Construction.Components;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.Construction.UI
|
|
{
|
|
[UsedImplicitly]
|
|
public sealed class FlatpackCreatorBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private FlatpackCreatorMenu? _menu;
|
|
|
|
public FlatpackCreatorBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<FlatpackCreatorMenu>();
|
|
_menu.SetEntity(Owner);
|
|
|
|
_menu.PackButtonPressed += () =>
|
|
{
|
|
SendMessage(new FlatpackCreatorStartPackBuiMessage());
|
|
};
|
|
|
|
_menu.OpenCentered();
|
|
}
|
|
}
|
|
}
|