Window position

Discussion and feedback on Construct 2

Post » Sun Jun 10, 2012 3:15 pm

After I export my project to dropbox when I play the program,via dropbox, the window appears at the top of the screen without the grey margins around it.The game has fullscreen off in the projects settings.My question is how can I place the game in the centre of the screen and have the grey margins showing.The window size is 640x480.
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sun Jun 10, 2012 6:30 pm

The HTML template (index.html) is different for preview and publish. Try saving preview index.html and then replace it in the published folder.

Whoops! Looked in preview html - it could be unsuitable for upload - there's some *.js scripts attached.
You should tweak some CSS to get border and make same center vertical align as in preview html file.

As for fullscreen - your game runs still in window, but just without fancy borders. I'm sure that exported page is more suitable for different pc configurations, though could be a bit fancier - like one on the preview.NugMan2012-06-10 18:36:41
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Sun Jun 10, 2012 6:35 pm

how do you save the preview html?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sun Jun 10, 2012 7:25 pm

You just need to know a little HTML to customise the export to your liking. In the install directory you can view the source of preview.html to see the HTML and CSS you need to get the centered, bordered display. Don't use all of preview.html, it's the wrong format for publishing - you just need to copy the relevant bits.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jun 10, 2012 7:50 pm

Complete dunce as far as HTML Ashley!Could you please show me which lines to edit?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498


Return to Construct 2 General

Who is online

Users browsing this forum: bilgekaan, Davioware, MadSpy, saiyadjin and 4 guests