How can I trigger "Fullscreen in Browser" behaviour

Get help using Construct 2

Post » Wed Apr 30, 2014 3:23 pm

How can I dynamically change the configuration setting "Fullscreen in Browser" behaviour. Please note that I am not referring to the Browser : Request Fullscreen - <mode> behaviour. Thanks.
sleep is only for the weak!
B
91
S
30
G
12
Posts: 139
Reputation: 12,013

Post » Thu May 01, 2014 3:36 pm

If I take your meaning correctly, NO.

Dynamically from what? From mobile browser to PC browser? Is your game Portrait or Landscape? What size is it developed at or for? Do you mean dynamically when it is run on a PC versus Phone? Do you mean removing the address bar? Is it a mobile web game?
You can accomplish what you need. Be a little more specific and post more details.

First, the game size settings are in the properties dialog. click on your project, then select the Full screen in browser setting that you would like.

These setting will work in combination with browser object. The setting in the properties are initiated in the JavaScript that's generated, then the browser object will add code to your to the index.html file allowing you to change the setting based on other conditions. It's a bit tricky and takes bit of testing to get the optimal settings especially if you're game is portrait based and you want it to run full screen in web browser (PC).
You can also add JavaScript to the index.html manually to extend it's functionality to remove address bar.

I'm almost done with a tutorial that I'm going to post that covers handling these size changes that should cover it.

Hope this helps a little but, if you be a little more specific and post more details and I'll respond here with what I think is the best solution.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests