Yanifska Posted March 22, 2015 Share Posted March 22, 2015 Hi, I am using:this.scale.pageAlignHorizontally = true;this.scale.pageAlignVertically = true;and the game is aligned horizontally but not vertically.I think the div is exactly the height of the game so it doesn't leave any room to place the game. Ia m not sure what part of the code I shall reveal so you people can help me, but basically I am using the mobile template. this is my index file:var gameWidth = Math.max(window.innerWidth, window.innerHeight) * window.devicePixelRatio;var gameHeight = Math.min(window.innerWidth, window.innerHeight) * window.devicePixelRatio;var ratio = gameHeight / 640;gameWidth /= ratio;gameHeight /= ratio;var game = new Phaser.Game(gameWidth, gameHeight, Phaser.CANVAS, 'game');and my boot file: this.input.maxPointers = 1; this.stage.disableVisibilityChange = true; if (this.game.device.desktop) { this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL ; this.scale.setMinMax(480, 260, 720, 480); this.scale.setUserScale(0.8, 0.8) this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; }i didn't touch the css file from the template Any one got an idea how I can get the game in the center of the screen ? thank you in advanceYaniv Link to comment Share on other sites More sharing options...
Yanifska Posted March 23, 2015 Author Share Posted March 23, 2015 Anyone ?Is there a way to set the size of the are around the game ? Like setting it to 100% height Link to comment Share on other sites More sharing options...
Recommended Posts