Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"
This reverts commit cbf329a82d.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.Medical.CrewMonitoring;
|
||||
using Robust.Client.UserInterface;
|
||||
|
||||
namespace Content.Client.Medical.CrewMonitoring;
|
||||
|
||||
@@ -15,7 +14,7 @@ public sealed class CrewMonitoringBoundUserInterface : BoundUserInterface
|
||||
protected override void Open()
|
||||
{
|
||||
EntityUid? gridUid = null;
|
||||
var stationName = string.Empty;
|
||||
string stationName = string.Empty;
|
||||
|
||||
if (EntMan.TryGetComponent<TransformComponent>(Owner, out var xform))
|
||||
{
|
||||
@@ -27,8 +26,10 @@ public sealed class CrewMonitoringBoundUserInterface : BoundUserInterface
|
||||
}
|
||||
}
|
||||
|
||||
_menu = this.CreateWindow<CrewMonitoringWindow>();
|
||||
_menu.Set(stationName, gridUid);
|
||||
_menu = new CrewMonitoringWindow(stationName, gridUid);
|
||||
|
||||
_menu.OpenCentered();
|
||||
_menu.OnClose += Close;
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
@@ -43,4 +44,13 @@ public sealed class CrewMonitoringBoundUserInterface : BoundUserInterface
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
_menu?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user