criminal records revival (#22510)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.StationRecords;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client.StationRecords;
|
||||
|
||||
@@ -17,33 +16,21 @@ public sealed class GeneralStationRecordConsoleBoundUserInterface : BoundUserInt
|
||||
base.Open();
|
||||
|
||||
_window = new();
|
||||
_window.OnKeySelected += OnKeySelected;
|
||||
_window.OnFiltersChanged += OnFiltersChanged;
|
||||
_window.OnKeySelected += key =>
|
||||
SendMessage(new SelectStationRecord(key));
|
||||
_window.OnFiltersChanged += (type, filterValue) =>
|
||||
SendMessage(new SetStationRecordFilter(type, filterValue));
|
||||
_window.OnClose += Close;
|
||||
|
||||
_window.OpenCentered();
|
||||
}
|
||||
|
||||
private void OnKeySelected((NetEntity, uint)? key)
|
||||
{
|
||||
SendMessage(new SelectGeneralStationRecord(key));
|
||||
}
|
||||
|
||||
private void OnFiltersChanged(
|
||||
GeneralStationRecordFilterType type, string filterValue)
|
||||
{
|
||||
GeneralStationRecordsFilterMsg msg = new(type, filterValue);
|
||||
SendMessage(msg);
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
|
||||
if (state is not GeneralStationRecordConsoleState cast)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_window?.UpdateState(cast);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user