Resizing the game window

The video nicely explain about handling the game window being switched to full screen and making sure the Background resizes to fit. However, it does not mention handling the Background size when changing the game window size with the mouse. In this case the Background won’t always fill the screen. One simple work-around is to switch the TextureRect Stretch Mode back to Scale, but this then affects the size of the texture pattern so in this case I suppose higher resolution images would be required. Another simple option is to set the Window Mode in General Settings to be FullScreen. Maybe there’s a more elaborate method using a Signal to resize the TextureRect in Tile mode?

not too sure whats going on there.

just been testing mine and when i resize window manually the background fills the screen.
ive got the texturerect as a a child of canvas layer and set the background to full rect.


and the texture rects properties to
image

if you wouldnt mind, would you be able to zip the project folder up and send it over to me please so i can take a look

and maybe a screenshot of what your seeing when you resize a window with the mouse please.

Cheers
Darren

This is odd, I opened the Speedy Saucer project today, checked that I had the same settings as you, which I do and the window correctly resizes. I think in future, if I get more strange behavior, before posting will just exit out of Godot and then re-start it to see if the problem goes away. Hopefully no more gremlins!

something strange going on tho, least its working as it should.
wonder if its something like the Vulkan side of the rendering playing up.

Yes, I’ll see what happens as I work through the course. If I get any more strange behavior will post here and I could do some searching on other Godot forums etc. to see if anyone else has had these issues.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms