Port DeltaV Lavaland Initial
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using Content.Shared.DeltaV.Shuttles;
|
||||
|
||||
namespace Content.Client.DeltaV.Shuttles.UI;
|
||||
|
||||
public sealed class DockingConsoleBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
[ViewVariables]
|
||||
private DockingConsoleWindow? _window;
|
||||
|
||||
public DockingConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Open()
|
||||
{
|
||||
base.Open();
|
||||
|
||||
_window = new DockingConsoleWindow(Owner);
|
||||
_window.OnFTL += index => SendMessage(new DockingConsoleFTLMessage(index));
|
||||
_window.OnClose += Close;
|
||||
_window.OpenCentered();
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
if (state is DockingConsoleState cast)
|
||||
_window?.UpdateState(cast);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (disposing)
|
||||
_window?.Orphan();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user