|Topic was automatically imported from the old Question2Answer platform.
Hi. I’m very new to Godot Engine, so sorry for this newbie question.
In my project, i have some interactive elements wich i need to always preserve its size, no matter the windows size. To achieve this, i disabled the Stretch mode in the project settings.
The problem is I also need the background image to stretch or shrink according to windows size. I’m using a TextureRect node for the background image. Due to my limited knowledge in godot, the only solution i have found is to adjust the TextureRect’s scale_rect property by code.
At first, i thoght i could simply adjust the background size automatically by making the TextureRec a child of some type of container (PanelContainer, HboxContainer, etc) and then tinker with their size flags, to get an ‘automatic’ background reescaling, but with this approach, the TextureRect doesn’t change its size when i change the size of the container.
Is there any method to reescale the TextureRect to window size other than doing it directly by code?
Thank you and sorry for my bad english.
ramazan | 2022-03-24 08:39
I’ll check those links. Thank you.
isdran | 2022-03-26 17:31