Border around viewport window?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 9BitStrider
:warning: Old Version Published before Godot 3 was released.

Is this possible? I’m interested in seeing if you could add a backdrop to the all black border around the viewport during runtime.

Not quiet clear for me what is your goal, but maybe a screen-space shader would do the job.

Dr_TwiSteD | 2017-08-15 07:34

He is talking about the black borders that show if you set your aspect ratio to be fixed, because then if the screen/window size doesn’t match, Godot creates black borders that can’t be drawn into (and I don’t know how tbh, maybe there is a hack I don’t know of :p).

This issue talks about the reverse in order to avoid borders: Implement additional stretch_aspect - crop · Issue #4492 · godotengine/godot · GitHub

Someone else tried to adress black margins too, but it wasn’t accepted. There is a discussion though Do not show black margins when stretch_aspect=keep by souryogurt · Pull Request #4134 · godotengine/godot · GitHub

Zylann | 2017-08-15 12:59

I was referring to the black void around the game window when the app is full screen. Apologies for not including specifics. But yes, I was interested to see if I could place a border around the game window. Seems like this may not be the case for now, though. Thanks for the information.

9BitStrider | 2017-08-15 14:25

:bust_in_silhouette: Reply From: jhice

Hi there,
I’ve played this game made with Godot 2 and it is responsive.

https://cowthing.itch.io/mushroom-towers

So it must be possible to catch the event of resize_screen (pick to right one ^^) and replace the elements in there, or use containers ?

In the game above there is event the particles moving on the screen, in fact all the graphics fill the window. Play with it in windowed mode and resize it!