Files
wwdpublic/Content.Client/UserInterface/Systems/MenuBar/GameTopMenuBarUIController.cs
Spatison ea939d1178 [Feature] Emotes Menu Type (#215)
* Revert "remove: отключим наше меню эмоций в пользу колеса эмоций"

This reverts commit 526211be

* Revert "fix: linter"

This reverts commit 8bf2cbfb

* feature: emotes menu type

* fix: linter

* fix: linter

* fixs

* fix

* Update speech_emote_sounds.yml

* Update speech_emote_sounds.yml

* Update dogs.yml

* Update animals.yml

* Update disease_emotes.yml

* Update WhiteEmotesMenu.xaml.cs

* Update WhiteEmotesMenu.xaml.cs

* Update tags.yml
2025-03-07 09:05:50 +03:00

69 lines
2.6 KiB
C#

using Content.Client._White.UI.Emotes;
using Content.Client.UserInterface.Systems.Actions;
using Content.Client.UserInterface.Systems.Admin;
using Content.Client.UserInterface.Systems.Bwoink;
using Content.Client.UserInterface.Systems.Character;
using Content.Client.UserInterface.Systems.Crafting;
using Content.Client.UserInterface.Systems.EscapeMenu;
using Content.Client.UserInterface.Systems.Gameplay;
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Client.UserInterface.Systems.MenuBar.Widgets;
using Content.Client.UserInterface.Systems.Sandbox;
using Robust.Client.UserInterface.Controllers;
using Content.Client.UserInterface.Systems.Language;
namespace Content.Client.UserInterface.Systems.MenuBar;
public sealed class GameTopMenuBarUIController : UIController
{
[Dependency] private readonly EscapeUIController _escape = default!;
[Dependency] private readonly AdminUIController _admin = default!;
[Dependency] private readonly CharacterUIController _character = default!;
[Dependency] private readonly CraftingUIController _crafting = default!;
[Dependency] private readonly AHelpUIController _ahelp = default!;
[Dependency] private readonly ActionUIController _action = default!;
[Dependency] private readonly SandboxUIController _sandbox = default!;
[Dependency] private readonly GuidebookUIController _guidebook = default!;
[Dependency] private readonly LanguageMenuUIController _language = default!;
[Dependency] private readonly WhiteEmotesUIController _whiteEmotes = default!; // WD EDIT
private GameTopMenuBar? GameTopMenuBar => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>();
public override void Initialize()
{
base.Initialize();
var gameplayStateLoad = UIManager.GetUIController<GameplayStateLoadController>();
gameplayStateLoad.OnScreenLoad += LoadButtons;
gameplayStateLoad.OnScreenUnload += UnloadButtons;
}
public void UnloadButtons()
{
_escape.UnloadButton();
_guidebook.UnloadButton();
_admin.UnloadButton();
_character.UnloadButton();
_crafting.UnloadButton();
_ahelp.UnloadButton();
_action.UnloadButton();
_sandbox.UnloadButton();
_language.UnloadButton();
_whiteEmotes.UnloadButton(); // WD EDIT
}
public void LoadButtons()
{
_escape.LoadButton();
_guidebook.LoadButton();
_admin.LoadButton();
_character.LoadButton();
_crafting.LoadButton();
_ahelp.LoadButton();
_action.LoadButton();
_sandbox.LoadButton();
_language.LoadButton();
_whiteEmotes.LoadButton(); // WD EDIT
}
}