Jump to content

Issues with Button onInputDown


Tempus35
 Share

Recommended Posts

EDIT: Fixed, it appears I was using 2.4 version of phaser and moved back to 2.3 and it works. Sorry.

 

EDIT: So the debug information on the phone shows that the pointer is active when you click down but isDown is still false. Any idea there?

 

So I have a simple button added to a scene, it works great on the browser etc but when I load it on a mobile browser it will not click anymore. I have turned on the debug settings to see where it detects input and also added console logs to see it it detects anything. It will respond to onInputOver and onInputOut but nothing else. Any help?

var btn = this.add.button(100, 100, 'button-start', this.startGame, this);btn.input.useHandCursor = false;btn.anchor.setTo(0, 0);btn.events.onInputOver.add(function(){	console.log('Over');}, this);btn.events.onInputDown.add(function(){	console.log('Down');}, this);btn.events.onInputUp.add(function(){	console.log('Up');}, this);btn.events.onInputOut.add(function(){	console.log('Out');}, this);
render: function(){    this.game.debug.pointer(this.game.input.mousePointer);    this.game.debug.pointer(this.game.input.pointer1);}
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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