Jump to content

fullscreen bug in 2.0.7 please confirm


oddskill
 Share

Recommended Posts

Hello Phaser community.

 

I have set up a simple example http://www.oddskill.net/coding/fullscreentest/ that shall go in NO_SCALE fullscreen mode

when 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 the

entire screen when pressing the start button, and sprite is not clickable anymore.

 

Same issue occurs when using SHOW_ALL as scale mode, regardless

of 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

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

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