Fix action bar not filling with mappables (#17218)

* Fix action bar not filling with mappables

* Update Content.Client/UserInterface/Systems/Actions/ActionUIController.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Vordenburg
2023-06-15 15:21:52 -04:00
committed by GitHub
parent db1e9ed8d7
commit 18837c305d
3 changed files with 16 additions and 1 deletions

View File

@@ -668,7 +668,18 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
{
if (args.Function == EngineKeyFunctions.UIClick)
{
_menuDragHelper.MouseDown(button);
if (button.Action == null)
{
var ev = new FillActionSlotEvent();
EntityManager.EventBus.RaiseEvent(EventSource.Local, ev);
if (ev.Action != null)
SetAction(button, ev.Action);
}
else
{
_menuDragHelper.MouseDown(button);
}
args.Handle();
}
else if (args.Function == EngineKeyFunctions.UIRightClick)