Files
tbd-station-14/Content.Client/UserInterface/Systems/MenuBar/GameTopMenuBarUIController.cs
Morb 16b3e2233a Emotes Menu (#26702)
* Basic emote radial menu

* Move out from corvax

* Move to UI controller & add to top menu bar and key bind

* Make emote play

* Add name localization for emotes

* Localize chat messages

* Fix emote menu

* Add categories localization

* Fixes

* Fix

* Add emotes entity blacklist

* Fix entity whitelist required all logic

* Remove unused wagging emote

* Revert sprite

* Set default texture for emote icon

* Update Resources/keybinds.yml

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
2024-04-28 21:38:23 -07:00

65 lines
2.4 KiB
C#

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.Emotes;
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;
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 EmotesUIController _emotes = default!;
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();
_emotes.UnloadButton();
}
public void LoadButtons()
{
_escape.LoadButton();
_guidebook.LoadButton();
_admin.LoadButton();
_character.LoadButton();
_crafting.LoadButton();
_ahelp.LoadButton();
_action.LoadButton();
_sandbox.LoadButton();
_emotes.LoadButton();
}
}