adminmenu fixes (#5305)
This commit is contained in:
@@ -1,14 +1,28 @@
|
||||
using Content.Client.Administration.Managers;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Client.Administration
|
||||
{
|
||||
public partial class AdminSystem
|
||||
{
|
||||
[Dependency] private readonly IClientAdminManager _adminManager = default!;
|
||||
private AdminNameOverlay _adminNameOverlay = default!;
|
||||
|
||||
private void InitializeOverlay()
|
||||
{
|
||||
_adminNameOverlay = new AdminNameOverlay(this, _entityManager, _eyeManager, _resourceCache, _entityLookup);
|
||||
_adminManager.AdminStatusUpdated += OnAdminStatusUpdated;
|
||||
}
|
||||
|
||||
private void ShutdownOverlay()
|
||||
{
|
||||
_adminManager.AdminStatusUpdated -= OnAdminStatusUpdated;
|
||||
}
|
||||
|
||||
private void OnAdminStatusUpdated()
|
||||
{
|
||||
AdminOverlayOff();
|
||||
}
|
||||
|
||||
public void AdminOverlayOn(BaseButton.ButtonEventArgs? _ = null)
|
||||
|
||||
Reference in New Issue
Block a user