Hello all!
First of all, Merry Christmas to you all!
I’m trying to fiddle around with layouts and I can’t seem to make it work the way I would like to. So the thing is I have three panels. Code and picture speak for themselves:
// Grey on image. Contains the following two containers (healthBar and hotbar)
Container container = new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.None, FillMode.None));
// Red on image
Container healthBar = new Container(new SpringGridLayout());
// Green on image
Container hotbar = new Container(new SpringGridLayout());
container.addChild(healthBar, 0, 0);
container.addChild(hotbar, 1, 0);
A quote from FillMode.None:
None - indicates that none of the children will be stretched and there default size will always be used.
Between healtBar and hotbar, healthbar is shorter. As you guys can see on the image, I want it to be one row above the hotbar and I want healthBar to keep its size in the cell. Whatever I do healthBar will be stretched to the size of hotbar.
What am I doing wrong?