0 Favourites

Set Canvas size with Scale?

  • I would like to create a loader layout that detects the screen size of the mobile device and automatically routes to the correct layout with the correct aspect ratio. Eg. iPad, iPhone size etc...

    Currently, by setting canvas size I only manage to get it working when the scale function is off (Only on browser). However, exporting to CocoonJS requires Full screen mode - scale which doesn't seem to turn out right.

    What I did was:

    1) Check WindowWidth & WindowHeight

    2) Set Canvas size

    3) Go to layout

    Is there any way to solve this? Or am I doing something wrong.

    Also I noticed the initial WindowWidth and WindowHeight values are the device's width and height. Not the WindowSize I set in C2's properties. This allows us to detect the device aspect ratio and sort them accordingly to different layouts.

    Thanks.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)