Change fullscreen mode on event.

Get help using Construct 2

Post » Tue Aug 28, 2012 8:40 pm

My app uses crop mode to handle multiple sizes of mobile browser to avoid the black bars of letterbox. However, when not on a mobile device, I want to switch back into letterbox. I tried doing:

[CODE]Browser->request fullscreen - Stretch (letterbox scale)[/CODE]

but this has no effect (in IE and FF at least).

Does anyone know how to change the scale mode in an event sheet?
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Aug 29, 2012 1:21 am

I don't think this can be done, as it has never really been needed except for niche applications like this. Perhaps you could export two versions?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Aug 29, 2012 12:15 pm

Check the manual entry for the Browser object:

[quote]Request fullscreen
Request that the browser enter fullscreen mode. Note the browser may ignore this request unless the action is in a user-initiated event, such as a mouse click, key press, touch event or button press.[/quote]

In other words, you cannot automatically enter a fullscreen mode in the browser. You have to request fullscreen in an 'on click' or 'on key pressed' event.

Also, IE does not support switching in to fullscreen at all. It only works in Chrome and Firefox.Ashley2012-08-29 12:16:46
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Fri Apr 29, 2016 12:39 pm

Is there a reason, why this isn't working with gamepad buttons, too? For me this counts as a "user-initiated event".
B
5
Posts: 15
Reputation: 255


Return to How do I....?

Who is online

Users browsing this forum: HeinRich, Zakeru and 25 guests