0 votes

I have a NinePatchRect that has a GridContainer in it which has a bunch of items. The GridContainer takes care of laying out its children in a grid, but I can't seem to find a way to get the NinePatchRect to expand so that it contains the GridContainer. I'd also like to specify a "padding" so that NinePatchRect expands a bit more than needed.

enter image description here

enter image description here

Ideally it would look something like this, which I achieved by manually moving the GridContainer's transform a bit to the bottom right, and expanding the NinePatchRect accordingly.

Is there a way to achieve this using Godot's UI without having to implement all the calculations in scripts?

enter image description here

Godot version 3.3.2
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.