Hi all,
I’ve been using this syntax to handle click events:
btn.on(‘pointerdown’, this.callBack, this)
But can’t figure out how to set up a click event that fires when user clicks anywhere on the canvas.
Much appreciated!
Hi all,
I’ve been using this syntax to handle click events:
btn.on(‘pointerdown’, this.callBack, this)
But can’t figure out how to set up a click event that fires when user clicks anywhere on the canvas.
Much appreciated!
This should do what you need:
this.input.on('pointerdown', () => console.log('click'));