More Effiecent Way of Using Uniform Grid for Inventory?

Question 1: Create two widgets, one for your inventory and one for your button. Inside your inventory widget, create the following:

The forloop minus -1 is because we start at slot zero rather than slot one. next we create widget, then add it to an array (this is just an array of MyInventorySlot-my slot widget). This array can be called later on to get access to any single slot. Then we add the newly created widget to the uniform grid in our inventory widget, which I called InventorySlotBox. Next we set the column and the row. I would suggest if you don’t know how the mod operator works, looking it up. And lastly we set the slots name to the index number. This is used in the next part. Also if you try this setup and nothing spawns, make sure you set your inventory size and columns variable.

Question 2: Instead of using a tick which just eats resources, you the event inside your button widget called on mouse enter. This event will fire anytime your mouse enters the box. Also there is an event on mouse exits if you need it. Here is my setup for this widget.

Hope this helps give you an idea on how to do things. If I completely missed a point let me know.

-Haka