+1 vote

I have a TextureRect with Labels inside. Sometimes, I need to scale the size of the TextureRect down a little. The text scales down with it and looks all crappy. Is there a way to allow the TextureRect to scale without affecting the text display? Up until now I have been keeping the text outside. But when I need to move the TextureRect around, I have to move all the pieces individually. Any ideas? Thanks.

Godot version v3.5.1.stable.official [6fed1ffa3]
in Engine by (79 points)

1 Answer

+1 vote
Best answer

In the inspector for the texture rect, you want to check "expand" for allowing the scale to be applied to the image inside the rect.
Don't use scale in the transform, just use the regular rectangle dimensions.

If you apply the scale to the transform it will affect all the children, while if you use the "expand" it will operate internally on the texture. Just adjust how you want to visualize the image inside the rect on the following drop-down menu.

by (56 points)
selected by

Thanks for answering. This was for a frame around a popup display with lots of text.

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.