Fix inventory UI not marking inputs as handled (#19097)

This commit is contained in:
Leon Friedrich
2023-08-14 09:55:17 +12:00
committed by GitHub
parent 23b8c41a5b
commit db33c5d916

View File

@@ -220,6 +220,7 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
if (args.Function == EngineKeyFunctions.UIClick) if (args.Function == EngineKeyFunctions.UIClick)
{ {
_inventorySystem.UIInventoryActivate(control.SlotName); _inventorySystem.UIInventoryActivate(control.SlotName);
args.Handle();
return; return;
} }
@@ -244,6 +245,12 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
{ {
_inventorySystem.UIInventoryAltActivateItem(slot, _playerUid.Value); _inventorySystem.UIInventoryAltActivateItem(slot, _playerUid.Value);
} }
else
{
return;
}
args.Handle();
} }
private void StoragePressed(GUIBoundKeyEventArgs args, SlotControl control) private void StoragePressed(GUIBoundKeyEventArgs args, SlotControl control)