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
49
S
9
G
4
Posts: 426
Reputation: 7,071

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
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Fri Apr 27, 2012 7:20 pm

How would I position a Sprite at the top visible Y coordinate?
B
49
S
9
G
4
Posts: 426
Reputation: 7,071

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
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

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
49
S
9
G
4
Posts: 426
Reputation: 7,071


Return to How do I....?

Who is online

Users browsing this forum: max2612, YoHoho and 8 guests