How do I move window on screen center?

Get help using Construct 2

Post » Mon Nov 09, 2015 9:46 pm

So I used local storage to remember the window width/heigtht, so that when i access the game again it remember the choosen screen size, and it works fine.

The problem is, every time i run the game again, the window is not centered on the screen, but ismoved to the right side. I tried using the NW.js X/Y action (scrollx/y) but didnt work. Maximizing and unmaximizing didn't work either, is there a way to move it to the center of my monitor?

Thanks!
B
65
S
22
G
4
Posts: 358
Reputation: 6,555

Post » Mon Nov 09, 2015 10:03 pm

if your talking about the viewport you can't in editor.you have to move the screen at load time. best way I found was a small sprite put it in the center of x,y location you want the screen and add a scroll too position, now on the onstart of layout, run the scroll to image. this will position your viewport to the center of that image.
B
8
S
1
Posts: 74
Reputation: 725


Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, kalibark2 and 32 guests