royibernthal Posted May 10, 2014 Share Posted May 10, 2014 My game fits perfectly into portrait view (when I don't force landscape view like I do in the code below), but on landscape view it's not perfect. Does it maybe have to do with the width/height ratio of the game? Here's the relevant part of boot: BootState.prototype.create = function(){game.stage.backgroundColor = 0xFFFFFF;game.input.maxPointers = 1;game.stage.disableVisibilityChange = true; //Disables pause when game loses focusgame.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = false; if (!game.device.desktop){game.scale.setScreenSize(true);game.scale.forceOrientation(true, false, 'incorrectOrientation');game.scale.enterIncorrectOrientation.add(BootState.prototype.rescale, this);}game.state.start('preloader');}BootState.prototype.rescale = function(){var _this = this; setTimeout(function(){ game.scale.orientationSprite.scale.set(game.width / game.scale.width, game.height / game.scale.height); }, 100);} Link to comment Share on other sites More sharing options...
stasuss Posted May 10, 2014 Share Posted May 10, 2014 It depends on the ratio of the screen and the game. And also whether browser bar is visible. And whether system bar is visible. Link to comment Share on other sites More sharing options...
Recommended Posts