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