I’m developing a main screen plugin that has a HSplitContainer as the root of UI controls and full rect layout so it fills all the space.
But the issue is that main screen plugins root control is a VBoxContainer which prevents the HSplitContainer from spanning the whole available vertical space.
Is there a way to change this root node or a workaround that solves my issue ?
Note
I tried the main screen plugin template in the examples repo “which uses a full rect centered container with a button” and the button seems not be centered vertically as shown in the screenshot.
So I think that this issue wasn’t there in Godot 3.x
If you just want the root node to be something other than a VBoxContainer, you can right-click it in the scene tree and select “change type”. Here’s a screenshot of the menu option in question:
Here’s the solution I got from the LEGEND aaronfranke on godot demo projects issues
“Try setting the button’s vertical size flags to expand and shrink center.”
which works perfectly without workarounds