From fb76bc803237c5f6aed488f3f8e383874a41facd Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 12 Oct 2022 15:07:23 +0200 Subject: [PATCH] Fix right clicking entries in the admin objects tab (#11866) --- .../Systems/Admin/AdminUIController.cs | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/Content.Client/UserInterface/Systems/Admin/AdminUIController.cs b/Content.Client/UserInterface/Systems/Admin/AdminUIController.cs index fd3bd8252f..be3b1fffb6 100644 --- a/Content.Client/UserInterface/Systems/Admin/AdminUIController.cs +++ b/Content.Client/UserInterface/Systems/Admin/AdminUIController.cs @@ -1,5 +1,6 @@ using Content.Client.Administration.Managers; using Content.Client.Administration.UI; +using Content.Client.Administration.UI.Tabs.ObjectsTab; using Content.Client.Administration.UI.Tabs.PlayerTab; using Content.Client.Gameplay; using Content.Client.UserInterface.Controls; @@ -34,15 +35,16 @@ public sealed class AdminUIController : UIController, IOnStateEntered(); _adminButton = UIManager.GetActiveUIWidget().AdminButton; LayoutContainer.SetAnchorPreset(_window, LayoutContainer.LayoutPreset.Center); + _window.PlayerTabControl.OnEntryPressed += PlayerTabEntryPressed; - _window.OnOpen += () => _adminButton.Pressed = true; - _window.OnClose += () => _adminButton.Pressed = false; - + _window.ObjectsTabControl.OnEntryPressed += ObjectsTabEntryPressed; + _window.OnOpen += OnWindowOpen; + _window.OnClose += OnWindowClosed; _admin.AdminStatusUpdated += AdminStatusUpdated; - _adminButton.OnPressed += AdminButtonPressed; _input.SetInputCommand(ContentKeyFunctions.OpenAdminMenu, @@ -51,10 +53,27 @@ public sealed class AdminUIController : UIController, IOnStateEntered