Change window to an acceptable size by code

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mymokol

I am working on a project and the window size has to be 1754x1240 px, but that’s too big for my monitor, which means i had to turn the full screen mod on to be able to see the whole thing. That in turn means that basically all debug that includes printing things is virtually impossible. How would I, by code, set the size of the window (i.e. stretch the window, as if I took its edge and resized it) so that it fits on my monitor and I can manipulate it?
Sorry if I’m not specific enough, please ask me questions if neccessary.

EDIT: Figured it out right after asking the question. The problem persists though, as the top of the screen is still above the monitor and it cannot be dragged down. How does one do that?

:bust_in_silhouette: Reply From: LoneDespair

Project settings → Display → Stretch
Mode = 2d
Aspect = expand

If you really need it be done through code, get_tree().set_screen_stretch(stretch, aspect, minsize)

If I misinterpreted your question, pls let me know

I already had that done, but i also already solved the problem myself, thanks :slight_smile:

mymokol | 2021-02-25 08:17