UMG widget button adds item to inventory

The problem here, is that you are removing an index. So everything is moving down to fill the empty slot. Itš changing to white because you are setting it to have no style, I’m not actually sure how to set a button to the default style though. So maybe rather than doing that, you should have an image for an empty slot. So you set any empty slots to use that image.
Youļl need a definition of an empty slot, which is just like a regular item, except you make it so you can’t take it from the cabinet (to rephrase that, you can’t add the item to your inventory, if you check the object that is being added, and itš empty, jsut don’t do anything). When you do take an item, you change that element in the array to be an empty item, rather than removing the index. Thatš just an idea

edit: Really though, a better way of doing this would probably have been to dynamically add item buttons for any items that are in the cabinet, instead of always adding 5, or maybe that was a design choice you made. It would be a bit harder to set up, but you wouldn’t have to keep 5 items in the array etc. you could have any amount, and just remove the button when the item is taken