Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Forcing landscape


Yora
 Share

Recommended Posts

I've been poking around StageScaleMode.js but just can't seem to figure out how to use it properly to force a mobile screen to landscape.  I need the game to pause and an image to appear when the screen is in portrait mode.  

 

Thanks for any help.  I'm sure it's something simple, javascript just confuses me sometimes. x)

Link to comment
Share on other sites

I'm using 'resize' event for this purpose.

window.addEventListener("resize", function() {	var newWidth = window.innerWidth;	var newHeight = window.innerHeight;        //Readjust your interface/graphic, or display a warning message	readjust(newWidth, newHeight);}, false);

But I would also interested in seeing how we can implement this with multiple screen/state in Phaser.

Anyone care to share their experience in this?

Link to comment
Share on other sites

  • 5 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...