Jump to content

Canvas ID to input text


Monstamash
 Share

Recommended Posts

  • 3 years later...
On 12/4/2013 at 1:48 PM, jcs said:

I don't believe phaser gives the canvas an id, no, but you can get the canvas (see the Stage object) and add an id to it


this.game.stage.canvas.id = 'foobar';

but make sure that canvas exists first. IIRC, it won't if you're using WebGL rendering

This is a 3 year old post but for anyone looking to disable their mouse cursor on the canvas element this is what the solution was for me. I had my game setup without a pre-existing canvas so I had no id I could just easily GIVE one to the element so I could use it. Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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