Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Canvas size and css


cpt.col.cool
 Share

Recommended Posts

Hi all

 

not sure if this can be called a bug but in case you run into the same issue.

 

I am using jQuery for all the user interface stuff including sending all kinds of mouesclicks through. I set up the canvas like below.

<canvas id="game"></canvas>...this.game = new Phaser.Game(800, 600, Phaser.AUTO, '#game', { preload: this.preload, create: this.create, update: this.update});

If you find some clicks not getting through, thats because the style width and height seem to be shorter than the instructed Phaser.Game width and height. So just add that to your css and everything's fine.

 

 

I hope that not something obvious. It is the thought that counts, right?

 

Regards
Joe

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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