[SOLVED] How do I center the window?

0 favourites
  • 15 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • I've set up a system that remember and sets a custom window width/height every time you start the game, the only problem is that when it triggers, the game window is not centered on my screen. Is there some java code allowing me to do that?

  • Are you talking about centering in a browser? Phone?

    Do you have an example/screenshot?

  • Are you talking about centering in a browser? Phone?

    Do you have an example/screenshot?

    Centering the game window (in windows)

  • With NW.js? Do you have any fullscreen scaling?

    Should be automatically centered... If you're talking about your game in a window centered on the users screen/desktop, I don't think that can be done within the program, it will be up to the user to manually reposition the window.

    Or maybe I still don't understand what you are talking about.

  • If you're talking about your game in a window centered on the users screen/desktop

    Yes that is my issue. The prblem is whenever the window changes from NW.js it is no longer centered on the desktop, so the user must manually reposition it, and that's what i want to prevent. It's a minor thing, i now xD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Danwood

    You could test this little app (64b) to test center position if you want.

    Works on Win7 64b, I don't trest on win8.1/win10 atm.

  • Danwood

    You could test this little app (64b) to test center position if you want.

    Works on Win7 64b, I don't trest on win8.1/win10 atm.

    That works! how to integrate it in my project?

  • I quickly created a node-webkit-advanced plugin with node-webkit original features plus extra features (Quit app, SetWindowPositionToCenter, enter fullscreen, leave fullscreen, trigger when lost focus, trigger on focus, force quit app when on close event...)

  • I quickly created a node-webkit-advanced plugin with node-webkit original features plus extra features (Quit app, SetWindowPositionToCenter, enter fullscreen, leave fullscreen, trigger when lost focus, trigger on focus, force quit app when on close event...)

    Is it hard to do, could i do it myself too or i need to get the plugin?

  • I think you can close this thread as Solved - I will post the download link for this plugin soon

  • I think you can close this thread as Solved - I will post the download link for this plugin soon

    well seems is not solved

  • Why not?

  • Because the plugin hasn't been posted?

  • I have to add more stuff before post it but Danwood already own a beta version

  • I have to add more stuff before post it but Danwood already own a beta version

    Exactly, i can't wait for the final version though

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