Best way to display dictionary keys and values in a panel (inventory)?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi!
My player’s inventory is stored in a dictionary. Keys are added to the dictionary when the player first obtains an item. Values are just variables.
What is the best/recommended way to display the inventory keys and their values in a 2d control node of some kind (something like itemlist so I can attach a texture to each key)?
Is this even the way to do this?

The other tactic I had in mind is to store inventory items as variables in a global script and when they’re >0, add them to a menulist (instance a menu item for each).

Which is better, this or the dictionary. How does everyone go about player inventories?