]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix medical PDA/health analyzer long range intel bug (#31879)
authorgoet <6637097+goet@users.noreply.github.com>
Sat, 21 Sep 2024 05:54:48 +0000 (07:54 +0200)
committerGitHub <noreply@github.com>
Sat, 21 Sep 2024 05:54:48 +0000 (15:54 +1000)
* hide spriteview from health analyzer while inactive

* add out of range indicator if analyzer becomes inactive

* hide out of range icon if there is no patient data

Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml
Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Resources/Textures/Interface/Misc/health_analyzer_out_of_range.png [new file with mode: 0644]

index 97968c4b990b3dbb8f53c6f7556ae6ededa43783..19d00a0bbf8b1d89fe94763d1ed638aa5e8ce828 100644 (file)
@@ -21,6 +21,7 @@
                 Orientation="Vertical">
                 <BoxContainer Orientation="Horizontal" Margin="0 0 0 5">
                     <SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64" />
+                    <TextureRect Name="NoDataTex" Access="Public" SetSize="64 64" Visible="false" Stretch="KeepAspectCentered" TexturePath="/Textures/Interface/Misc/health_analyzer_out_of_range.png"/>
                     <BoxContainer Margin="5 0 0 0" Orientation="Vertical" VerticalAlignment="Top">
                         <RichTextLabel Name="NameLabel" SetWidth="150" />
                         <Label Name="SpeciesLabel" VerticalAlignment="Top" StyleClasses="LabelSubText" />
index 9b96f5d3fe9284284dce9153efebd3693e00259a..d61267d002c6b5c4805c1c96c825b07088b69a5e 100644 (file)
@@ -73,6 +73,8 @@ namespace Content.Client.HealthAnalyzer.UI
             // Patient Information
 
             SpriteView.SetEntity(target.Value);
+            SpriteView.Visible = msg.ScanMode.HasValue && msg.ScanMode.Value;
+            NoDataTex.Visible = !SpriteView.Visible;
 
             var name = new FormattedMessage();
             name.PushColor(Color.White);
diff --git a/Resources/Textures/Interface/Misc/health_analyzer_out_of_range.png b/Resources/Textures/Interface/Misc/health_analyzer_out_of_range.png
new file mode 100644 (file)
index 0000000..8a76b0e
Binary files /dev/null and b/Resources/Textures/Interface/Misc/health_analyzer_out_of_range.png differ