Ahelp in lobby (#708)

This commit is contained in:
Jabak
2024-09-25 19:56:09 +03:00
committed by GitHub
parent 4de84b6fa3
commit 982185a2bb
2 changed files with 9 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Client._Ohio.Buttons;
using Content.Client.Administration.Managers;
using Content.Client.Administration.Systems;
using Content.Client.Administration.UI.Bwoink;
@@ -45,7 +46,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
private BwoinkSystem? _bwoinkSystem;
private MenuButton? GameAHelpButton => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>()?.AHelpButton;
private Button? LobbyAHelpButton => (UIManager.ActiveScreen as LobbyGui)?.AHelpButton;
private OhioLobbyTextButton? LobbyAHelpButton => (UIManager.ActiveScreen as LobbyGui)?.AHelpButton;
public IAHelpUIHandler? UIHelper;
private bool _discordRelayActive;
private bool _hasUnreadAHelp;
@@ -192,7 +193,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
UIHelper = isAdmin ? new AdminAHelpUIHandler(ownerUserId) : new UserAHelpUIHandler(ownerUserId);
UIHelper.DiscordRelayChanged(_discordRelayActive);
UIHelper.SendMessageAction = (userId, textMessage, playSound) =>
UIHelper.SendMessageAction = (userId, textMessage, playSound) =>
_bwoinkSystem?.Send(userId, textMessage, isAdmin, playSound);
UIHelper.InputTextChanged += (channel, text) => _bwoinkSystem?.SendInputTextUpdated(channel, text.Length > 0);
UIHelper.OnClose += () => { SetAHelpPressed(false); };