How to properly resize windows?

  • So, in short - I'm using the NodeWebkit object to try to resize the window at double size. It's a pixel-game so I'd really like the option of a bigger and still-crispy screen.

    So I I use Set Window Width and Set Window Height and manually input 1024x576. But, it seems that this action increases the entire windows size - including the borders.

    Not the display only. So the display isn't doubled and the letterbox kicks in.

    Now, is there a system expression like "window border" so that I could use "(WindowWidth*2)-WindowBorder_X" or something along those lines?

    Thank you in advnace.

  • Use letterbox integer scale. Don't just double the window size, why not use the Browser object to enter fullscreen mode?

  • Oh, but I am using letterbox integer scale. It doesn't change the fact that one can't input the proper window size without it also incorporating unneeded borders. I'd put it in manually to fit perfectly, but I'm honestly not completely sure if that won't cause problems for other operating systems and the way they handle windows borders.

    I also am already using fullscreen mode, but not all players like it, and I certainly am not inclined to force anyone into one display mode.

    2x window is an useful alternative for those who want to keep a window of the game and still see everything in detail.

    I assume there's no expression similar to what I'm looking for then?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My game is 320x240.

    if the resolution is 4/3, so 1.333333... ratio, i use always

    for 640x480 :
    ( WindowWidth * 2 ) + 16
    ( WindowHeight * 2 ) + 38
    
    for 960x720 :
    ( WindowWidth * 3 ) + 16
    ( WindowHeight * 3 ) + 38
    

    with this, the scale is good with node-webkit with LetterBox Scale

    16 & 38 are the border size of node-webkit

  • Oh, so the borders aren't system dependent? I assumed they were.

    This is beautiful then.

    Thanks a lot, I've never worked with cross-platform releases so I just assumed the worst.

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