diff --git a/Content.Client/Forensics/ForensicScannerBoundUserInterface.cs b/Content.Client/Forensics/ForensicScannerBoundUserInterface.cs new file mode 100644 index 0000000000..c5d3f15659 --- /dev/null +++ b/Content.Client/Forensics/ForensicScannerBoundUserInterface.cs @@ -0,0 +1,40 @@ +using Content.Shared.Forensics; +using Robust.Client.GameObjects; + +namespace Content.Client.Forensics +{ + public sealed class ForensicScannerBoundUserInterface : BoundUserInterface + { + private ForensicScannerMenu? _window; + + public ForensicScannerBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + _window = new ForensicScannerMenu(); + _window.OnClose += Close; + _window.Print.OnPressed += _ => Print(); + _window.OpenCentered(); + } + + private void Print() + { + SendMessage(new ForensicScannerPrintMessage()); + _window?.Close(); + } + + protected override void ReceiveMessage(BoundUserInterfaceMessage message) + { + if (_window == null) + return; + + if (message is not ForensicScannerUserMessage cast) + return; + + _window.Populate(cast); + } + } +} diff --git a/Content.Client/Forensics/ForensicScannerMenu.xaml b/Content.Client/Forensics/ForensicScannerMenu.xaml new file mode 100644 index 0000000000..b3bfff7771 --- /dev/null +++ b/Content.Client/Forensics/ForensicScannerMenu.xaml @@ -0,0 +1,14 @@ + + +