Command to open chatbox in a new window (#33548)
* Command to open chatbox in a new window * Add command for users with AdminChat permission * Add command button to admin tools window
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Chat;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
@@ -40,6 +40,15 @@ public sealed partial class ChannelFilterPopup : Popup
|
||||
return _filterStates.TryGetValue(channel, out var checkbox) && checkbox.Pressed;
|
||||
}
|
||||
|
||||
public void SetActive(ChatChannel channel, bool isActive)
|
||||
{
|
||||
if (_filterStates.TryGetValue(channel, out var checkbox) && checkbox.Pressed != isActive)
|
||||
{
|
||||
checkbox.Pressed = isActive;
|
||||
OnChannelFilter?.Invoke(checkbox.Channel, checkbox.Pressed);
|
||||
}
|
||||
}
|
||||
|
||||
public ChatChannel GetActive()
|
||||
{
|
||||
ChatChannel active = 0;
|
||||
|
||||
Reference in New Issue
Block a user