Ninjadoodle

Game gets shifted when turning to landscape mode

Recommended Posts

Hi @enpu

I've posted a bug about this on Github but just wounding if you've had  a change to have a look into this :)

When I turn my game into landscape mode on iOS, the who game gets shifted up, some of it hiding under the top bar.

Also, is there a way to get the game to switch to fullscreen on changing to landscape, like in the example below ...

http://ninjadoodle.com/levels/level-12/

I made this example in Construct 3 and just wondering if this fullscreen switch could be done in Panda?

Thanks heaps!

Share this post


Link to post
Share on other sites

Hi @enpu

Sorry to bump this, but I was just wondering whether you've had a chance to see if this is possible to fix. I've been trying to make a template for my levels which works in both portrait and landscape, but I can't get it to work with the current issue.

Thanks heaps in advance for any info :)

Share this post


Link to post
Share on other sites

I did take a look at this, and it seems to be a bit tricky one.

Here is temporary fix that you can try, until i figure out better one:

game.System.inject({
    _updateWindowSize: function() {
        this.super();
        if (game.device.iPhone && window.innerWidth > window.innerHeight && window.innerHeight === window.screen.width) {
            this._windowHeight++;
        }
        if (game.device.iPhone) document.body.scrollTop = 0;
    }
});

 

Share this post


Link to post
Share on other sites

Hi @enpu

Thanks heaps for that! That's a million times better than before :)

You can still break it by sliding up when it's in fullscreen landscape, but that might just be a browser problem and I'm not sure if it can be fixed.

Thanks again for the workaround fix!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.