Health analyzer has tooltips now
This commit is contained in:
@@ -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}"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user