Forensics (#8451)
* Port forensics from nyanotrasen * port updates * printing * Update Resources/Locale/en-US/forensics/forensics.ftl Co-authored-by: Veritius <veritiusgaming@gmail.com> * Update Content.Server/Forensics/Components/ForensicPadComponent.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Update Content.Server/Forensics/Systems/ForensicPadSystem.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Update Content.Server/Forensics/Systems/ForensicScannerSystem.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * partially address reviews * comments * redo the events * handle it * rewrite loc * master fixes Co-authored-by: ike709 <ike709@github.com> Co-authored-by: Veritius <veritiusgaming@gmail.com> Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user