Hello Everyone. I have a VBoxContainer that I add HBoxContainers to programmatically, then I add TextureButtons to the HBoxContainers, creating a grid of buttons. I would like to center the main VBoxContainer in the scene regardless of how many rows and columns are added. To do this I was hoping to get the dimensions of the VBoxContainer after adding all of the buttons and then moving it based on:
var x = (scenex - boardx)/2
var y = (sceney - boardy)/2
Unfortunately everything I try returns a size of (0, 0) for the VBoxContainer. I understand by default a container node does not have a size but I thought it's size updated after adding children. Is there someway to get the size of the container? Or is there a better way to center the container?