Feature request: NW.js window size settings

0 favourites
  • 6 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • The way window size works right now is it includes the window borders when you set resolution. So if I set window size to 320x256 in Windows 7 it'll fit the window borders inside that resolution so the actual game window is only 304x218. Problem is, window border size varies between OS'es, Windows versions, and theme settings so it's impossible to make sure the game always runs at the same resolution in windowed mode. If I run the same 320x256 res in classic mode for instance, the game resolution is suddenly 312x218.

    It would be great if we had an alternate window size setting that made window borders expand to fit the game resolution instead of the other way around.

  • You just have to calculate the size of the border and add it to the final window size. Set 2 global vars to the native resolution, then subtract that from the retrieved window size.

  • Thanks

  • You just have to calculate the size of the border and subtract it. Set 2 global vars to the native resolution, then subtract that from the retrieved window size.

    Could you reword or dumb this down for me please? Or make a project file of it, if that's not too much to ask.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fisholith made an example here:

  • Fisholith made an example here:

    Thanks to you and them, then.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)