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:
eoineoineoin
2025-04-14 16:37:58 +01:00
committed by GitHub
parent a1439c5637
commit 7c4b34c1de
8 changed files with 110 additions and 1 deletions

View File

@@ -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;