How do I... vertical align for scale-inner fullscreen view?

  • Hi!

    I'm trying to build an interface consisting of a main viewing window and a frame (no scrolling), and I would like it to be compatible with 10:16, 9:16 and 9:19.5 (and anything in between) screens by cutting off the upper part of the frame. Setting fullscreen to scale-inner gets me closest to this, but there the visible area is centered. Is there any way to make it align differently, or an alternate way to get the same result with another fullscreen mode?

    Basically like this, with the different colored portions "added on top" for the longer resolutions:

  • derboo

    Scale Inner will show as much of the layout as it can without ever showing anything outside the layout.

    So, when a device can't show the full layout it will be centered by default.

    You just have to set scroll Y to the bottom of your layout.

    There are a few other things to watch out for... if you are manually positioning objects, it takes the browser about 0.1 seconds to figure out what its dimensions are. (after that, the dimensions don't change unless you trigger the "Browser - On Resized" event... then you have to Wait 0.1 seconds again.)

    You can also use the Anchor behavior to position objects - they will stay in a relative position to the edges they are anchored to...

    I made a quick sample which works on my iphone, ipad and desktop:

    https://www.rieperts.com/games/forum/screen_anchor.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, that's smart. The anchoring works quite well for me, thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)