Change window size from script (SOLVED)

#1

I’d like to be able to list some recommended window sizes in the game options. When the player selects one, the window size will change.

I’m surprised Defold doesn’t offer this, since every other engine I can think of offers it as a basic window function.

1 Like

#2

You are able to change window size using the following message:

msg.post("@render:", "resize", { width = 1024, height = 768 } )
4 Likes

#3

There is also DefOS if you wish to make more changes to the window, mouse cursor etc

3 Likes

#4

Ah, I looked up how to do it in old posts and the response was that there is no way. Maybe those were outdated. Oops. Great, thank you both!

1 Like