oddskill Posted August 15, 2014 Share Posted August 15, 2014 Hello Phaser community. I have set up a simple example http://www.oddskill.net/coding/fullscreentest/ that shall go in NO_SCALE fullscreen modewhen clicking the start button . That only works in chrome.In firefox 31.0 and ie 11.0.11, tested on Win 7 and Win 8.1. the game fills theentire screen when pressing the start button, and sprite is not clickable anymore. Same issue occurs when using SHOW_ALL as scale mode, regardlessof the screens aspect ratio. Can anybody confirm that behaviour, is it a Phaser bug, or do i do something wrong in my code? I s there a way to scale the game "area" in fullscreen mode by hand using something like.******************************************* this.scale.minWidth = 320;this.scale.minHeight = 480;this.scale.maxWidth = 640;this.scale.maxHeight = 960;this.scale.setScreenSize(true);******************************************which at first glance seems to work in NOT fullscreen mode ? Any help would really be appreciated as by now i really spend to much time playing around with that fullscreen issue. best regards Chris PS: sourcecode below var game = new Phaser.Game(640, 480, Phaser.CANVAS, 'container', { preload: preload, create: create, update: update });var img;var spriteexplosion;var sound;var startbutton;function preload() { game.load.image('cow', './assets/cow.png'); game.load.audio('explosionsfx', 'assets/explosion.wav'); game.load.spritesheet('explosiongfx', 'assets/explosion.png', 128, 128, 16); game.load.spritesheet('control_startbtn', 'assets/control_startbutton.png', 107, 41, 1);}function create() { game.scale.fullScreenScaleMode = Phaser.ScaleManager.NO_SCALE; game.stage.backgroundColor = '#00ff00'; game.physics.startSystem(Phaser.Physics.ARCADE); img = game.add.sprite(20, 20, 'cow'); game.physics.enable(img, Phaser.Physics.ARCADE); img.body.velocity.x=100; img.body.velocity.y=100; img.body.collideWorldBounds = true; img.body.bounce.set(1); img.anchor.setTo(0.5, 0.5); img.inputEnabled = true; img.input.start(0, true); img.events.onInputDown.add(select); sound = game.add.audio('explosionsfx',1,true); startbutton = game.add.button(game.world.centerX, 100, 'control_startbtn', goFull, this, 0, 0, 0); startbutton.name = 'btn_startbtn'; startbutton.anchor.setTo(0.5, 0.5); }function update() { }function goFull(){ game.scale.startFullScreen();}function select(img, pointer) { img.destroy(); sound.play('',0,1,false); spriteexplosion = game.add.sprite(img.x, img.y, 'explosiongfx'); spriteexplosion.anchor.setTo(0.5, 0.5); spriteexplosion.animations.add('explosiongfx_anim'); spriteexplosion.animations.play('explosiongfx_anim', 20, false);} Link to comment Share on other sites More sharing options...
rhmoller Posted August 20, 2014 Share Posted August 20, 2014 I have the same problem with FF 31 on Ubuntu. The canvas always fills the whole screen without considering aspect ratios, no matter which scale mode I use. It works as expected in chrome. Link to comment Share on other sites More sharing options...
rhmoller Posted August 20, 2014 Share Posted August 20, 2014 The solution is to place phaser inside a wrapper div and set that div as the scalemanager fullscreenTarget. Link to comment Share on other sites More sharing options...
oddskill Posted August 29, 2014 Author Share Posted August 29, 2014 Thanx rhmoller. I will try that, regards Chris Link to comment Share on other sites More sharing options...
Recommended Posts