I have been making a drag and drop interface for my inventory, I would like to know if it is possible to test if there are any widgets under the mouse cursor from the widget that is being dragged?
A lot of the solutions I have seen online talk about using the OnHovered event (or similar functions) and sending that reference to a manager class but this would mean setting up this behaviour to work with potentially hundreds of inventory slots.
What I’m looking for is a way to get what widgets are under the cursor when the mouse button is released that doesn’t rely on data from all of the widgets in the inventory, just the one being dragged at the time.
Hello! Are you using BP or CPP? Anyway you shouldmt care yourself about widget finding, because drag operation is used with three states of this process.
In CPP there is very similar picture, just native methods to override. Take a look for example at this (there are also native OnDragEnter and OnDragLeave, but have no their declarations under hand)