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
17
S
6
G
3
Posts: 370
Reputation: 3,942

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

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
415
S
247
G
92
Posts: 25,282
Reputation: 200,843

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
S
1
Posts: 15
Reputation: 405

Post » Sun Nov 05, 2017 10:23 pm

Why can we leave fullscreen with a gamepad button but not enter the fullscreen mode?
Why is there a difference between a keyboard key and a Gamepad Button on doing this?
Any news about this problem? Is this issue fixed on construct 3?
B
12
S
3
Posts: 25
Reputation: 822

Post » Mon Apr 16, 2018 7:05 am

Picoti wrote:Why can we leave fullscreen with a gamepad button but not enter the fullscreen mode?
Why is there a difference between a keyboard key and a Gamepad Button on doing this?
Any news about this problem? Is this issue fixed on construct 3?


I'm having this same issue. I've recently added an option in my game to toggle fullscreen on or off. It works perfectly fine using a keyboard button to toggle, and gamepad works when I'm turning off fullscreen, but I can't turn fullscreen on with the controller button. Help would be appreciated. Thanks.
B
14
S
4
Posts: 15
Reputation: 1,276

Post » Fri Apr 20, 2018 11:43 am

Bump. Any help would be appreciated for my comment above.
B
14
S
4
Posts: 15
Reputation: 1,276

Post » Fri Apr 20, 2018 12:07 pm

guys fullscreen wont work until interaction happens. I do this by adding event touch like on any touch> go fullscreen. It works 100%
Image
B
89
S
31
G
2
Posts: 132
Reputation: 8,482

Post » Sat Apr 21, 2018 4:09 am

jatin1726 wrote:guys fullscreen wont work until interaction happens. I do this by adding event touch like on any touch> go fullscreen. It works 100%


No that isn't the problem. I can set it to go fullscreen just fine with a keyboard button or a mouse click, but it won't work with a gamepad button to turn on fullscreen, but works fine if it's turning off fullscreen. I wanted my game to have full-controller support on Steam when I eventually publish it there, so this would be a problem since the player would have to use the mouse or keyboard to turn on fullscreen.
B
14
S
4
Posts: 15
Reputation: 1,276

Post » Sat Apr 21, 2018 6:00 am

@Taz The gamepad works to request full screen here.
B
82
S
48
G
32
Posts: 466
Reputation: 23,659

Next

Return to How do I....?

Who is online

Users browsing this forum: Aedagio, Lordshiva1948 and 6 guests