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

@@ -3,6 +3,7 @@ using Content.Client.Examine;
using Content.Client.Storage;
using Content.Client.UserInterface.Controls;
using Content.Client.Verbs;
using Content.Client.Verbs.UI;
using Content.Shared.Clothing.Components;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
@@ -12,6 +13,7 @@ using Content.Shared.Inventory.Events;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Shared.Containers;
using Robust.Shared.Input.Binding;
using Robust.Shared.Prototypes;
@@ -23,10 +25,10 @@ namespace Content.Client.Inventory
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IUserInterfaceManager _ui = default!;
[Dependency] private readonly ClientClothingSystem _clothingVisualsSystem = default!;
[Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly VerbSystem _verbs = default!;
public Action<SlotData>? EntitySlotUpdate = null;
public Action<SlotData>? OnSlotAdded = null;
@@ -270,7 +272,7 @@ namespace Content.Client.Inventory
if (!TryGetSlotEntity(uid, slot, out var item))
return;
_verbs.VerbMenu.OpenVerbMenu(item.Value);
_ui.GetUIController<VerbMenuUIController>().OpenVerbMenu(item.Value);
}
public void UIInventoryActivateItem(string slot, EntityUid uid)