diff --git a/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs b/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs index ec639c8b90..bdb81962d8 100644 --- a/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs +++ b/Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs @@ -1,7 +1,5 @@ -using System.Collections.Generic; +using Content.Shared.Containers.ItemSlots; using Robust.Client.GameObjects; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; using Robust.Shared.Prototypes; using static Content.Shared.Access.Components.SharedIdCardConsoleComponent; @@ -23,6 +21,10 @@ namespace Content.Client.Access.UI base.Open(); _window = new IdCardConsoleWindow(this, _prototypeManager) {Title = _entityManager.GetComponent(Owner.Owner).EntityName}; + + _window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId)); + _window.TargetIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(TargetIdCardSlotId)); + _window.OnClose += Close; _window.OpenCentered(); } @@ -41,11 +43,6 @@ namespace Content.Client.Access.UI _window?.UpdateState(castState); } - public void ButtonPressed(UiButton button) - { - SendMessage(new IdButtonPressedMessage(button)); - } - public void SubmitData(string newFullName, string newJobTitle, List newAccessList) { if (newFullName.Length > MaxFullNameLength) diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml b/Content.Client/Access/UI/IdCardConsoleWindow.xaml index 5c47218870..d095ec46f6 100644 --- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml +++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml @@ -1,13 +1,13 @@ -