Creation of inventory

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Adam
:warning: Old Version Published before Godot 3 was released.

I am trying to create an inventory for a game (the one you store items) but I don’t really know how. I have tried to use Panel nodes (as many as the stored items) but I don’t know if this is the best way.

Also as I would like to paint the inventory, should this be a sprite parent node or should I use a completely different kind of node?

:bust_in_silhouette: Reply From: Zylann

For a custom game inventory I would make custom Control nodes, that way I can do whatever I want and still benefit from the basics of the GUI systems (get input correctly, handle anchors, have a correct size etc).
Making a custom theme can help for the most classic elements (buttons, sliders, checkboxes, text boxes…) but if I have to manage item slots for example I’ll rely on scripted Controls, TextureFrames and Sprites.
But all that is theory, I never build an inventory in Godot yet. You have to try, read the docs and learn how GUI nodes work, that way you’ll be able to extend them to your needs more easily :slight_smile: