Health analyzer has tooltips now

This commit is contained in:
Janet Blackquill
2025-10-01 18:33:44 -04:00
parent 33eede4592
commit 6dafd77fe9
23 changed files with 471 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
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}"));
}
}