Blueprint Widgets: How to make clean inventory system

Hi all,

I have an existing inventory system that doesn’t use widgets. It uses the Draw Texture functions in the HUD and relies on a lot of complicated maths to calculate where to put everything based on viewport size and such. I thought it may be easier to use widgets for my system. However, I am unsure how I could effectively use widgets to make a system where you could drag items from one inventory slot to another. I could make a transparent button and place it over all my slots, but this would be time consuming and I would have to repeat a lot of code: I would need to make an event for each slot in my inventory. Is there a way that I can use widgets and make a system so I can drag items around? How could I do this cleanly?

Thanks in advance for your advice!

Hey there, i did a diablo like inventory system for my game, so its definitely possible but it requires a bit of work. The way i did it is having a wdiget for the slot and a widget for the item itself. On construct you bind the slot to the array position and construct the item widgets given its content. Then on the item widget you add a drag and drop operation and when you drop it on an empty slot you do the transfer in the arrays and fire an update event.