Telash Posted February 19, 2014 Share Posted February 19, 2014 Hey guys,I'm having a bit of an issue regarding the game scaling correctly, for the most part it's fine however on the Galaxy Tab 2 it seems to be quite erratic and every time i change the device orientation it's overall display changes as well, rarely repeating itself.I am currently using the following code in my boot file: create: function () { this.game.input.maxPointers = 1; this.game.stage.disableVisibilityChange = true; this.game.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL; this.game.stage.scale.minWidth = 320; this.game.stage.scale.minHeight = 442; this.game.stage.scale.maxWidth = 800; this.game.stage.scale.maxHeight = 1104; this.game.stage.scale.pageAlignHorizontally = true; this.game.stage.scale.setScreenSize(true); this.game.state.start('Preloader'); }Any help would be appreciated.Thanks. Link to comment Share on other sites More sharing options...
rich Posted February 19, 2014 Share Posted February 19, 2014 It sounds like it might take a while for the Tab to update its new window width/height values? (hard to say without seeing some kind of screen shot or video to be honest). You might find it useful to listen for these events:this.game.stage.scale.hasResized.add(this.gameResized, this);this.game.stage.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this);this.game.stage.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this);And then do some further checks / tests within them (i.e. test the new screen size, is it as expected yet? if not maybe fire off another check after a short delay). Link to comment Share on other sites More sharing options...
Telash Posted February 19, 2014 Author Share Posted February 19, 2014 Thanks Rich I'll give it a try. Link to comment Share on other sites More sharing options...
Recommended Posts