0 votes

My tree looks like this:

-----TextureRect (many more)

How would I resize the TextureRects to be smaller or larger in the code? Setting rect_size, rect_scale, or rect_min_size don't work because the parent layout doesn't listen to them. I think it might have something to do with the size flags, but I have tried setting these to a lot of things and haven't seen any changes. Thanks!

in Engine by (29 points)

1 Answer

+1 vote

Try setting expand true on the TextureRects and ensure stretch_mode is one of the settings that will scale to a given rect size instead of keeping texture's size. Then setting rect_min_size should do what you want.

by (85 points)
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.