Correctly update the admin button the chat box.

This commit is contained in:
Pieter-Jan Briers
2020-11-01 23:55:55 +01:00
parent 711166f43a
commit 637581bf3b
4 changed files with 60 additions and 29 deletions

View File

@@ -1,10 +1,8 @@
using Content.Shared.Chat;
using Robust.Client.Console;
using Robust.Client.Graphics.Drawing;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
@@ -97,16 +95,13 @@ namespace Content.Client.Chat
ToggleMode = true,
};
var groupController = IoCManager.Resolve<IClientConGroupController>();
if(groupController.CanCommand("asay"))
AdminButton = new Button
{
AdminButton = new Button
{
Text = Loc.GetString("Admin"),
Name = "Admin",
ToggleMode = true,
};
}
Text = Loc.GetString("Admin"),
Name = "Admin",
ToggleMode = true,
Visible = false
};
AllButton.OnToggled += OnFilterToggled;
LocalButton.OnToggled += OnFilterToggled;