diff --git a/Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs b/Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs index d28d3228c94d41..12b678d5d47b49 100644 --- a/Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs +++ b/Content.Client/CartridgeLoader/Cartridges/LogProbeUi.cs @@ -1,4 +1,5 @@ using Content.Client.UserInterface.Fragments; +using Content.Shared.CartridgeLoader; using Content.Shared.CartridgeLoader.Cartridges; using Robust.Client.UserInterface; @@ -13,16 +14,23 @@ public override Control GetUIFragmentRoot() return _fragment!; } - public override void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner) + public override void Setup(BoundUserInterface ui, EntityUid? fragmentOwner) { _fragment = new LogProbeUiFragment(); + + _fragment.OnPrintPressed += () => + { + var ev = new LogProbePrintMessage(); + var message = new CartridgeUiMessage(ev); + ui.SendMessage(message); + }; } public override void UpdateState(BoundUserInterfaceState state) { - if (state is not LogProbeUiState logProbeUiState) + if (state is not LogProbeUiState cast) return; - _fragment?.UpdateState(logProbeUiState.PulledLogs); + _fragment?.UpdateState(cast.EntityName, cast.PulledLogs); } } diff --git a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml index d12fb55cdceff8..cdbaf7d6ee7d74 100644 --- a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml +++ b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml @@ -18,4 +18,9 @@ + +