This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Godot 3.2 RC2

Hi,

I'm working on a PC only app and I want it to run fullscreen, but I'm struggling with getting it set up.

In the settings I have "resizable", "borderless" and "fullscreen" ticked, but the window is never resizable. With borderless unticked, there isn't a border that I can see either. Stretch is set to disabled, and aspect is set to expand.

When I move the app to another monitor of a different resolution (Windows + Shift + Arrow_Key), it doesn't expand to fill to that monitor and there are no resize handles or an expand button to make it bigger.

Essentially, I want it to always fill the screen, no matter what screen it is on, but it doesn't seem to work that way. What's more if I switch from a 1080p monitor to a 1440p monitor and then back again, the original 1080p window shrinks to 802 pixels in height.

Has anyone experienced this weirdness or know how I should be approaching this? Thanks.

in Engine by (384 points)

1 Answer

+1 vote

"resizable" means that the user can adjust the window in size at the window borders.
Adding "borderless" removes the minimize / maximize, the close buttons etc in the top right at your window you usually have.
"fullscreen" is like "borderless" and the unticked "resizable".
You complained that "fullscreen" not works as intended. Maybe you need to check manualy if your monitior resized and implet it as a script like so:

var screen_size : Vector2 = Vector2()

func _ready():
screen_size = OS.get_screen_size()# Gets the screen size to test in futur if its change since their

func _process(delta) -> void:
    if OS.get_screen_size() != screen_size: #Tests if your screen changed in size, e.g a different monitor
        screen_size = OS.get_screen_size()
        OS.set_window_size(screen_size)# Sets your window to your screen size

Hopefully I could help you :)

by (32 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.