Brandybuck Posted October 29, 2013 Share Posted October 29, 2013 Hey Guys, I'm new to Phaser and can't wrap my head around something!That's to say, i'm not sure whether i've found a bug or doing something wrong.. Right now i've got this game that wants to go fullscreen.define(function(){ var p = Main.prototype; Main.game = null; Main.juggler = []; function Main() { Main.game = new Phaser.Game(568, 320, Phaser.AUTO, 'holder', { preload: this.preload, create: this.create, update: this.update }); g.game = Main.game } p.preload = function() { Main.game.load.bitmapFont('orangejuice', 'fonts/orangejuice.png', 'fonts/orangejuice.xml'); Main.game.load.image("curtain", "images/curtain.png"); Main.game.load.image("bg-cage", "images/bg-cage.png"); Main.game.load.image("title", "images/title.png"); Main.game.load.image("btn-start", "images/btn-start.png"); Main.game.load.image("tassel", "images/tassel.png"); } p.create = function() { //Main.game.input.onDown.add(function(){ // Main.game.stage.scale.startFullScreen(); //}, this); Main.game.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL; //resize your window to see the stage resize too Main.game.stage.scale.setShowAll(); Main.game.stage.scale.refresh(); new Splash(); } p.update = function() { for(key in Main.juggler) Main.juggler[key](); } g.Main = Main; new Main(); });When I un-comment that bit of code, the game enters fullscreen as soon as you click it.(I know that's bad practice, but it's easier to debug this way) Now, in my Splash class I create a single button that will trigger something.define(function(){ var p = Splash.prototype; function Splash() { this.tassel = Main.game.add.sprite(0,0,"tassel"); this.tassel.inputEnabled = true; this.tassel.events.onInputDown.add(this.onTasselClicked, this); } p.onTasselClicked = function(){ alert("you clicked me!"); }})However, when i'm in fullscreen mode, i can't exactly click the button. The hitbox for the onInputDown event stays where it was before going fullscreen. So clicking the actual sprite doesn't trigger anything, but clicking the area where the sprite used to be does. Is this a bug or am i missing something? Link to comment Share on other sites More sharing options...
rich Posted October 29, 2013 Share Posted October 29, 2013 Could you please submit a github issue for this? (ideally with a little compact code example) as I'm 90% sure it's an issue we'll need to investigate, rather than being something wrong with your code. I know it's a bit of a pain having to repost this on github, but it's really really helpful for us Link to comment Share on other sites More sharing options...
degorov Posted November 7, 2013 Share Posted November 7, 2013 I experience the same issue. Sprite click event stops working after entering fullscreen and even after going back to "windowed" mode. UPD: Seems to come out only when scaling/distortion is applied. When the canvas is resized and not scaled/distorted, everything works as it should. Link to comment Share on other sites More sharing options...
rich Posted November 7, 2013 Share Posted November 7, 2013 So if you scale a canvas AND full-screen it this happens?? (as I said in my post above, a code sample would help us track this down significantly faster) Link to comment Share on other sites More sharing options...
janerivi Posted March 31, 2014 Share Posted March 31, 2014 I have the same issue on Phaser 2.0.2 Link to comment Share on other sites More sharing options...
oddskill Posted August 16, 2014 Share Posted August 16, 2014 I have the same behaviour in 2.0.7. explained here http://www.html5gamedevs.com/topic/8589-fullscreen-bug-in-207-please-confirm/http://www.html5gamedevs.com/topic/8589-fullscreen-bug-in-207-please-confirm/ regards Link to comment Share on other sites More sharing options...
Recommended Posts