Godot Version
4.3.stable.mono
Question
How to align properly Control nodes in a GridContainer?
Here’s what the problem looks like:
The marquee is the selected GridContainer (placed inside a Panel and anchored to it).
It has 8 Control nodes as children, set in two columns with the proper separation, so those should fill it entirely.
Here is the structure of the GridContainer:
And here is what a ‘recovery_spot’ (the Control nodes) look like:
If you look back, you can see that the visible sprite of the recovery_spot Controls (and the invisible ones also) appear centered at their coordinates in the GridContiner. For the life of me, I could not make them offset so that the children appear inside of the confines of the GridContainer.
P.S. The contents of the GridContainer will not change during the game, so using it is questionable and placing the Control nodes on screen manually makes more sense, but I need to know how to do this, in case it’s unavoidable and because I bet I’m missing something basic and I need to know.