* Reapply "Remove some BUI boilerplate" (#30214)
This reverts commit cb0ba66be3.
* Fix gas tank
* Fix PA
* Fix microwave
* Comms console underwrap
* Fix rcd
* log wehs
37 lines
982 B
C#
37 lines
982 B
C#
using Content.Shared.MedicalScanner;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.HealthAnalyzer.UI
|
|
{
|
|
[UsedImplicitly]
|
|
public sealed class HealthAnalyzerBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private HealthAnalyzerWindow? _window;
|
|
|
|
public HealthAnalyzerBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
_window = this.CreateWindow<HealthAnalyzerWindow>();
|
|
|
|
_window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
|
|
}
|
|
|
|
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
|
|
{
|
|
if (_window == null)
|
|
return;
|
|
|
|
if (message is not HealthAnalyzerScannedUserMessage cast)
|
|
return;
|
|
|
|
_window.Populate(cast);
|
|
}
|
|
}
|
|
}
|