25 lines
727 B
C#
25 lines
727 B
C#
using Content.Shared.MedicalScanner;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.HealthAnalyzer.UI.Tooltips;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class BloodFlowTooltip : PanelContainer
|
|
{
|
|
public BloodFlowTooltip()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
}
|
|
|
|
public void Update(HealthAnalyzerScannedUserMessage msg)
|
|
{
|
|
if (msg.WoundableData is not { } woundable)
|
|
return;
|
|
|
|
Label.Text = Loc.GetString("health-analyzer-blood-flow-tooltip", ("heartrate", woundable.HeartRate), ("health", $"{woundable.HeartHealth * 100:F1}"));
|
|
}
|
|
}
|