How do I change orientation/canvas size depending on screen

Get help using Construct 2

Post » Tue Mar 31, 2015 1:47 pm

Hi! Is it possible to Change the entire size of the game/app depending on the users Screen Resolution? I tried "Set Canvas Size" but it did not work out.
I want the app to Support Portrait and landscape and it would be great if you could have a different UI on landscape or in General on big Screens. Is this possible?
(would be nice for my Win8 Project to have a bigger UI and different layout on Windows PC than on WinPhone).

Maybe with different Layouts? I tried to Change page depending on platform and then Change the canvas size if on Windows 8 but it does not seem to work, its still showing the layout in portrait mode.
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Tue Mar 31, 2015 2:00 pm

through the browser object you can check if the game is in portrait or landscape
Using the viewportleft, viewportright, viewportbottom and viewporttop, you can get the exact size of the game and change things accordingly.

It's possible to make completely responsive design this way, scaling layers and or exchanging sprites etc. , depending on the different circumstances.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 22, 2015 9:16 am

I tried to Change the layout/canvas size with "Set Canvas Size" (System) but it does not seem to do anything when I enter different values. It just Shows another part of the layout but the game/app is still the same size in my browser. Any ideas how this works?
B
53
S
16
G
6
Posts: 718
Reputation: 9,150

Post » Wed Apr 22, 2015 9:25 am

I'm not sure what you are trying to achieve..

I always tend to use one of the fullscreen-modes and change layer-scale and or sprites, sizes, etcetera according to the size and orientation of the window.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jun 18, 2015 12:18 pm

@littlestain Could you please explain your last statement

I always tend to use one of the fullscreen-modes and change layer-scale and or sprites, sizes, etcetera according to the size and orientation of the window.

As I didn't know what do you mean by sprites sizes or size or orientation ?
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051


Return to How do I....?

Who is online

Users browsing this forum: Ashley, ismael123, newt and 4 guests