* WIP: first prototype * Change text slightly * Allow names to wrap * Add label for the scan mode * Remove ugly text * Readd bleeding message * Update code * Allow for the Health Analyzer UI to grow vertically
38 lines
983 B
C#
38 lines
983 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);
|
|
}
|
|
}
|
|
}
|