How to switch fullscreen scale modes in runtime?

Get help using Construct 2

Post » Fri Jan 10, 2014 8:06 pm

Hello.

Like the title says. I'm trying to switch between fullscreen scale modes during runtime with the 'request fullscreen in browser' action but I can't get it to work. Cancelling and requesting fullscreen work fine, but switching between scale modes doesn't. It won't change away from what I've set it to in the editor. I'm using 'On key pressed' conditions to trigger the changes.

Also, is there a way to query device/screen resolution with events?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Sun Jan 12, 2014 1:22 am

Usually in Games you would have a options menu that allows you to Adjust these before gameplay begins...

Using pull down lists or something similiar

I found when using Chrome having a "Fullscreen" Button on your hud or gui works better than a keypress...Chrome uses 'F11' normally to change to fullscreen mode..You could over ride this I'm pretty sure
There is a thread about overiding browser default keyboard shortcuts somewhere..which may assist you also

If you look closely when you set up your events
you can make any type of Fullscreen mode occur as long as it connected to an event....

I've tested it ..it works every time..especially if you use a simple system of pull down listsboxes or radio buttons to switch modes..

I cant see any reason why key presses wouldnt work
but the same issue happens for me occasionally which is why I prefer to use a menu based options ..which has the advantage of being able to set fullscreen mode before gameplay begins

I think the Manual entry on this says that Some browsers "may or might" require a onscreen button to enable that request Full Screen in Browser event.

It is closely tied to the Window Size functions and the to a lesser degree the layout size...

changing layout size isnt a great idea during run time..but you can dynamically alter the window size ...

Perhaps checking to see if the full screen window size matches or correlates to the Aspect ratio of the device that you are trying to change to fullscreen might help..

I've had no troubles with the Node web kit export ...

Could you post a Capx or show an example demo..

and include which browsers you intend to use...

Hope that helps

mystazsea2014-01-12 01:41:06
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Sun Jan 12, 2014 5:05 pm

Thanks for the reply :) I'll be sure to take a proper look when I have a bit more time and reply again then. Regarding target platforms; desktop deployment is what I'm after, so node-webkit all the way.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Mon Jan 13, 2014 11:45 pm

Here's a small test capx, press 6 to switch between the three modes.

https://dl.dropboxusercontent.com/u/70562654/CanvasSizeBugRep.capx

If for instance I have Scale Outer set in the editor settings then the runtime will *always* use that scalemode. So going from Scale Outer to Scale Inner or Crop or whatever with Request Fullscreen has no effect. I get my fullscreen, but the scale mode stays the same.

I tried to link the switching to buttons just to check and it's the same thing.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Sun Jan 19, 2014 2:14 pm

Bump.

Shouldn't this work? I'm doing this from user-initiated events, just as the manual prescribes.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Sun Feb 09, 2014 12:14 am

I'm having this issue as well. it seems that changing the different fullscreen modes does nothing in runtime, it just uses whatever mode was set in the authoring app and stick with that. I'm trying to do this with Nodekit.

What I want is for the user to have the option to play in fullscreen mode with the game scaled to stretch to the edge of the screen, or to play at the native 1024x768 size.
B
6
Posts: 8
Reputation: 553

Post » Mon Jan 25, 2016 2:11 am

I know that this was posted quiet a long time ago.
Anyway I made a feature request on this one HERE.
If you read this please support my request and let's try to get @Ashley moving towards adding this feature.
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730


Return to How do I....?

Who is online

Users browsing this forum: Nicolas951, rayolf and 21 guests