diff --git a/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs b/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs new file mode 100644 index 0000000000..2d492c5e1b --- /dev/null +++ b/Content.Client/Thief/ThiefBackpackBoundUserInterface.cs @@ -0,0 +1,52 @@ +using Content.Shared.Thief; +using JetBrains.Annotations; +using Robust.Client.GameObjects; + +namespace Content.Client.Thief; + +[UsedImplicitly] +public sealed class ThiefBackpackBoundUserInterface : BoundUserInterface +{ + private ThiefBackpackMenu? _window; + + public ThiefBackpackBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { } + + protected override void Open() + { + base.Open(); + + _window = new ThiefBackpackMenu(this); + _window.OnClose += Close; + _window.OpenCentered(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Dispose(); + _window = null; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not ThiefBackpackBoundUserInterfaceState current) + return; + + _window?.UpdateState(current); + } + + public void SendChangeSelected(int setNumber) + { + SendMessage(new ThiefBackpackChangeSetMessage(setNumber)); + } + + public void SendApprove() + { + SendMessage(new ThiefBackpackApproveMessage()); + } +} diff --git a/Content.Client/Thief/ThiefBackpackMenu.xaml b/Content.Client/Thief/ThiefBackpackMenu.xaml new file mode 100644 index 0000000000..c1739eb321 --- /dev/null +++ b/Content.Client/Thief/ThiefBackpackMenu.xaml @@ -0,0 +1,39 @@ + + + +