Godot Version
4.2.1 Stable Mono
Question
I have a function that dynamically adds buttons to a Vbox container.
These buttons have HBOX containers within them that contain multiple
labels. I want to set the separation value for these hbox containers as
they’re added but evidently, You can’t edit the Separation parameter for
a Box Container in GDscript which seems like a massive oversight.
I looked through the documentation and found this “add_spacer” method
which takes a bool for some reason and does absolutely nothing regardless
of if it’s set to true or false. Which means the only possible way to do this
is to create a control variable for every item in the hbox and add them
manually which is incredibly inefficient not to mention a pain. The “add_spacer”
method has a total of 31 words dedicated to it across the entire Godot docs
website. So either the add_spacer method is broken or the documentation is missing critical information.
Does anyone know a better way to do this?