A way to deal with scaled games and alt+Enter?

Get help using Construct 2

Post » Fri Apr 27, 2012 4:01 pm

Hi
I'm working on a game set to full screen (scaled), which works great under normak conditions, BUT if I press alt+Enter to make the brower to go into total full screen mode, the wondow size changes and some things loose their apropriate position.

Is there a way to detect when someone changes the browsers screen mode via alt-enter or a menu and auto correct things as it clearly did when starting up?

This is NOT going from non-"full screen" to "full screen". These are two varients of "full screen"
make sense?
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Fri Apr 27, 2012 4:47 pm

You should position things every tick, or with the Anchor behavior (which positions every tick) - presumably you're just positioning stuff once on startup which breaks when the window size changes.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Apr 27, 2012 7:20 pm

How would I position a Sprite at the top visible Y coordinate?
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Fri Apr 27, 2012 7:53 pm

Use anchor to the top.
Alternatively, for more control, set position to:
scrolly + windowheight - sprite.height/2 - buffer

buffer is the distance from the top of the screen.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Fri Apr 27, 2012 8:40 pm

Hmmm. Id use anchor to top..but it doesnt seem like theres a way to turn off anchoring versus one side or the other. Why can't i JUST anchor to top?
B
45
S
8
G
4
Posts: 414
Reputation: 6,805


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, mystazsea and 15 guests