I'm making a clicker in Godot, and I want the upgrades to line up in a way so that once you buy an upgrade, the next upgrade(or node) moves up to fill in the position. It's kind of hard to explain it, but I think you should get the gist of it. As a beginner programmer, I have no clue how to do that.
I haven't tried anything yet, since I have no idea where to start.
For clearer examples, consider 3 nodes, and the positions being (0,0), (1,0), and (2,0). (I will edit those positions later if I need them)
The first one is at (0,0) and when the first node is removed, the second one takes its place, and the third node takes the second node's place etc. Also when I mean disappear/removed, I just mean probably once you've clicked on it with the right amount of resources, (clicker game) it runs its code and it sets visibility to false.
A
VBoxContainerwill have the behaviour you describe.Containers will ignore hiddenControls, andVBoxContainerthat will organize its children vertically (i.e. in a column).You might also want the
Controls to steadily move up. You could archive that using a tween to reduce the size of theControlyou are about to hide. However, I would like to encourge you to focus on making it functional first.I'll also remind you to set the
disableproperty ofButtons when they should not be clickable.