From ff9cf108b6c436a07b94f03673a367d8addf2990 Mon Sep 17 00:00:00 2001 From: eoineoineoin Date: Tue, 6 Dec 2022 23:46:07 +0000 Subject: [PATCH] UX improvements to Air Alarm UI (#12681) Co-authored-by: Eoin Mcloughlin --- .../Monitor/UI/AirAlarmBoundUserInterface.cs | 2 +- .../Atmos/Monitor/UI/AirAlarmWindow.xaml | 58 ++- .../Atmos/Monitor/UI/AirAlarmWindow.xaml.cs | 47 ++- .../Atmos/Monitor/UI/Widgets/PumpControl.xaml | 2 +- .../Monitor/UI/Widgets/ScrubberControl.xaml | 4 +- .../Atmos/Monitor/UI/Widgets/SensorInfo.xaml | 38 +- .../Monitor/UI/Widgets/SensorInfo.xaml.cs | 78 ++-- .../UI/Widgets/ThresholdBoundControl.xaml | 7 + .../UI/Widgets/ThresholdBoundControl.xaml.cs | 95 +++++ .../Monitor/UI/Widgets/ThresholdControl.xaml | 6 +- .../UI/Widgets/ThresholdControl.xaml.cs | 250 +++---------- .../Controls/FancyWindow.xaml.cs | 27 +- .../Tests/Atmos/AlarmThresholdTest.cs | 125 +++++-- .../Atmos/Monitor/AtmosAlarmThreshold.cs | 334 ++++++++++-------- Resources/Locale/en-US/atmos/air-alarm-ui.ftl | 20 +- .../Prototypes/Atmospherics/thresholds.yml | 51 ++- 16 files changed, 649 insertions(+), 495 deletions(-) create mode 100644 Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml create mode 100644 Content.Client/Atmos/Monitor/UI/Widgets/ThresholdBoundControl.xaml.cs diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs b/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs index 0b5fae2255..cf884dd509 100644 --- a/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs +++ b/Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs @@ -20,7 +20,7 @@ public sealed class AirAlarmBoundUserInterface : BoundUserInterface { base.Open(); - _window = new AirAlarmWindow(); + _window = new AirAlarmWindow(Owner); if (State != null) { diff --git a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml index b8f18a8b3d..2914223be9 100644 --- a/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml +++ b/Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml @@ -1,11 +1,17 @@ - + - - + + + + + + -