Context menu UI backend refactor & better UX (#13318)

closes https://github.com/space-wizards/space-station-14/issues/9209
This commit is contained in:
Kara
2023-01-07 21:24:52 -06:00
committed by GitHub
parent 17be16f1b1
commit 45da85fec6
14 changed files with 218 additions and 187 deletions

View File

@@ -14,6 +14,8 @@ using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Timing;
using System.Diagnostics.CodeAnalysis;
using Content.Client.Verbs.UI;
using Robust.Client.UserInterface;
namespace Content.Client.Hands.Systems
{
@@ -22,11 +24,11 @@ namespace Content.Client.Hands.Systems
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IUserInterfaceManager _ui = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly StrippableSystem _stripSys = default!;
[Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly VerbSystem _verbs = default!;
public event Action<string, HandLocation>? OnPlayerAddHand;
public event Action<string>? OnPlayerRemoveHand;
@@ -240,9 +242,9 @@ namespace Content.Client.Hands.Systems
return;
}
_verbs.VerbMenu.OpenVerbMenu(entity);
_ui.GetUIController<VerbMenuUIController>().OpenVerbMenu(entity);
}
public void UIHandAltActivateItem(string handName)
{
RaisePredictiveEvent(new RequestHandAltInteractEvent(handName));