I want to create an inventory system that keeps track of the amount of each item you have and are able to scroll through each one and selecting which ever item will activate it. I’m unsure what exactly to use to accomplish this. Should I use an array of items that keeps track of the item name and how many of each you have? Also I don’t know how to make it so when you scroll through that the system can keep track of which item you are on by displaying an arrow next to it and then tell if it has been selected. Once selected I am also unsure of how to activate a certain function from that array. So here’s an example of how it would look ingame.
Inventory
> potion1 [ 1 ]
potion2 [ 0 ]
potion3 [ 5 ]