What you can do is a add some buttons that show textures of each of the items in your array. Then, you can add events for each button (like on click or on hover) to interact with the items.
For example, you have up to 10 items in your array.
- You create 10 buttons in your inventory, one for each item.
- You assign, to each button, the corresponding texture (for example, your first button will be related to the item in index 0 in your array). If you have a potion in your index 0, show a potion texture in the first button in your inventory.
- So, now that you are showing in the screen the texture of the item, you can bind an event to clicking each button. Then, in the event you just fired with the click, you have to make a reference to the button index, get the item in your inventory array, and interact with it.
Let me know if you need more guidance and I’ll post some screenshots of a quick set up.