Hi all,
I’ve built an inventory UI in Blueprints (WBP_Inventory
) that has two WrapBoxes (HotbarWrapBox
+ BackbagWrapBox
). These are populated with WBP_Slot
widgets, which each hold item data (S_Slot) from my BPC_Inventory
component.
-
With mouse + keyboard: I can drag & drop items between slots, and it works fine.
-
With a controller: I can already navigate between the slots using the D-Pad and select them with the A button.
-
When I select a slot, I spawn a
WBP_DraggedItemWidget
that shows only the item’s image (the same visual I use for mouse drag).
Issue:
I don’t know how to make the WBP_DraggedItemWidget
appear over the currently focused slot and then “follow” focus as I move around the WrapBox with the D-Pad. With mouse it’s easy (cursor position), but with controller I need the widget to track whichever slot is focused.
Question:
How can I position a widget (my dragged icon) at the center of the currently focused WBP_Slot
, and update its position as focus changes when navigating with a controller?
Thanks in advance!