Кнопочка AHelp в лобби
This commit is contained in:
@@ -41,9 +41,6 @@
|
|||||||
|
|
||||||
<info:LinkBanner Name="LinkBanner" VerticalExpand="True" HorizontalAlignment="Center" />
|
<info:LinkBanner Name="LinkBanner" VerticalExpand="True" HorizontalAlignment="Center" />
|
||||||
|
|
||||||
<Button Name="AHelpButton" Access="Public" Text="{Loc 'ui-lobby-ahelp-button'}"
|
|
||||||
StyleClasses="Button" />
|
|
||||||
|
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
@@ -105,6 +102,12 @@
|
|||||||
ButtonText="Привязать Discord"
|
ButtonText="Привязать Discord"
|
||||||
Margin="0 10 0 10" />
|
Margin="0 10 0 10" />
|
||||||
|
|
||||||
|
<buttons:OhioLobbyTextButton
|
||||||
|
Name="AHelpButton"
|
||||||
|
Access="Public"
|
||||||
|
ButtonText="AHelp"
|
||||||
|
Margin="0 10 0 10" />
|
||||||
|
|
||||||
<buttons:OhioLobbyTextButton
|
<buttons:OhioLobbyTextButton
|
||||||
Name="QuitButton"
|
Name="QuitButton"
|
||||||
Access="Public"
|
Access="Public"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Content.Client._Ohio.Buttons;
|
||||||
using Content.Client.Administration.Managers;
|
using Content.Client.Administration.Managers;
|
||||||
using Content.Client.Administration.Systems;
|
using Content.Client.Administration.Systems;
|
||||||
using Content.Client.Administration.UI.Bwoink;
|
using Content.Client.Administration.UI.Bwoink;
|
||||||
@@ -45,7 +46,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
|||||||
|
|
||||||
private BwoinkSystem? _bwoinkSystem;
|
private BwoinkSystem? _bwoinkSystem;
|
||||||
private MenuButton? GameAHelpButton => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>()?.AHelpButton;
|
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;
|
public IAHelpUIHandler? UIHelper;
|
||||||
private bool _discordRelayActive;
|
private bool _discordRelayActive;
|
||||||
private bool _hasUnreadAHelp;
|
private bool _hasUnreadAHelp;
|
||||||
@@ -192,7 +193,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
|||||||
UIHelper = isAdmin ? new AdminAHelpUIHandler(ownerUserId) : new UserAHelpUIHandler(ownerUserId);
|
UIHelper = isAdmin ? new AdminAHelpUIHandler(ownerUserId) : new UserAHelpUIHandler(ownerUserId);
|
||||||
UIHelper.DiscordRelayChanged(_discordRelayActive);
|
UIHelper.DiscordRelayChanged(_discordRelayActive);
|
||||||
|
|
||||||
UIHelper.SendMessageAction = (userId, textMessage, playSound) =>
|
UIHelper.SendMessageAction = (userId, textMessage, playSound) =>
|
||||||
_bwoinkSystem?.Send(userId, textMessage, isAdmin, playSound);
|
_bwoinkSystem?.Send(userId, textMessage, isAdmin, playSound);
|
||||||
UIHelper.InputTextChanged += (channel, text) => _bwoinkSystem?.SendInputTextUpdated(channel, text.Length > 0);
|
UIHelper.InputTextChanged += (channel, text) => _bwoinkSystem?.SendInputTextUpdated(channel, text.Length > 0);
|
||||||
UIHelper.OnClose += () => { SetAHelpPressed(false); };
|
UIHelper.OnClose += () => { SetAHelpPressed(false); };
|
||||||
|
|||||||
Reference in New Issue
Block a user