From 7f76d49ea8144054927df360df2facb7a7bcf5ea Mon Sep 17 00:00:00 2001 From: vulppine Date: Fri, 19 Aug 2022 00:20:50 -0700 Subject: [PATCH] whoops! --- .../Atmos/Monitor/UI/Widgets/SensorInfo.xaml | 30 +++++++++++-------- .../Monitor/UI/Widgets/SensorInfo.xaml.cs | 12 ++++---- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml index cda3c9a4fe..ee1ef6b7eb 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml +++ b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml @@ -3,19 +3,23 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs index 30ae8de850..de2b2c1a40 100644 --- a/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs +++ b/Content.Client/Atmos/Monitor/UI/Widgets/SensorInfo.xaml.cs @@ -35,15 +35,16 @@ public sealed partial class SensorInfo : BoxContainer { var label = new Label(); label.Text = Loc.GetString("air-alarm-ui-gases", ("gas", $"{gas}"), - ("amount", $"{(amount / data.TotalMoles):0.##}")); + ("amount", $"{amount:0.####}"), + ("percentage", $"{(amount / data.TotalMoles):0.##}")); GasContainer.AddChild(label); _gasLabels.Add(gas, label); } _pressureThreshold = - new ThresholdControl("Pressure", data.PressureThreshold, AtmosMonitorThresholdType.Pressure); + new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-pressure-title"), data.PressureThreshold, AtmosMonitorThresholdType.Pressure); PressureThresholdContainer.AddChild(_pressureThreshold); - _temperatureThreshold = new ThresholdControl("Temperature", data.TemperatureThreshold, + _temperatureThreshold = new ThresholdControl(Loc.GetString("air-alarm-ui-thresholds-temperature-title"), data.TemperatureThreshold, AtmosMonitorThresholdType.Temperature); TemperatureThresholdContainer.AddChild(_temperatureThreshold); @@ -59,7 +60,7 @@ public sealed partial class SensorInfo : BoxContainer foreach (var (gas, threshold) in data.GasThresholds) { - var gasThresholdControl = new ThresholdControl(gas.ToString(), threshold, AtmosMonitorThresholdType.Gas, gas); + var gasThresholdControl = new ThresholdControl(Loc.GetString($"air-alarm-ui-thresholds-gas-title", ("gas", $"{gas}")), threshold, AtmosMonitorThresholdType.Gas, gas, 100); gasThresholdControl.ThresholdDataChanged += (type, threshold, arg3) => { OnThresholdUpdate!(_address, type, threshold, arg3); @@ -84,7 +85,8 @@ public sealed partial class SensorInfo : BoxContainer } label.Text = Loc.GetString("air-alarm-ui-gases", ("gas", $"{gas}"), - ("amount", $"{(amount / data.TotalMoles):0.##}")); + ("amount", $"{amount:0.####}"), + ("percentage", $"{(amount / data.TotalMoles):0.##}")); } _pressureThreshold.UpdateThresholdData(data.PressureThreshold);