I want to make the texture buttons smaller, so normally I would scale the HBoxContainer to 0.5, but because its a child of the margin container, scaling is deactivated.
Can someone explain what I can do to change size of the child container.
You can manipulate containers using the properties fill, expand, min size, and by nesting them within each other. It’s not very intuitive, but you can achieve almost anything this way. I once made a video about it, so hopefully it’ll still be helpful.
you don’t. the point of containers is to automate control size, this is an incredible feature of godot controls.
you can set a minimum size of a control and the container will resize itself to fit the children.
controls also have the expand option that allows them to occupy as much space on a container as possible, so if you have 3 controls with expand they will resize to occupy exactly 1/3rd of the space each. this can also be mixed with minimum size to create literally any combination of UI you can imagine.
containers can also use minimum size or be set to “full rect” to occupy the entire parent control. and can also use expand.
you should look at a tutorial on controls, since they are very powerful but require you to learn how to use them.
another incredible feature are themes, which will save you a lot of time if you use them correctly.
DON’T USE SCALE ON CONTROLS.
set the minimum size of the highest parent, the rest is simple math.
use a theme to set margincontainer borders (and more).
since margincontainer only accepts one child, change the minimun size of margin container and it should resize hbox.
your tree structure should be full of warnings. don’t ignore the warnings.
you should probably add something like a vbox as child of margin container and use it to hold the hbox and “other stuff”, whatever that is.
if you need stuff to do something like stick to the corners inside a margin container, you need a control or panel or something else to break the “container chain”.