Change window size from script (SOLVED)

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

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

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

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

4 Likes

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