tackle Posted May 4, 2014 Share Posted May 4, 2014 Not sure if anything's changed in later versions, but it turns out that if you click/press down on say a Button, and release outside it, it counts as a trigger on that button. Check this example, for example:http://examples.phaser.io/_site/view_full.html?d=buttons&f=action+on+click.js&t=action%20on%20click What would be the easiest way to check if it's released inside the button?My button callback looks like this now: onMenuButton:function(sprite, pointer) { if(Phaser.Rectangle.containsPoint(sprite.getBounds(), pointer.positionUp)) { //do stuff PicnicPanic.gameplayPaused = true; this.pauseMenu.show(); console.log('paused'); } },It feels a bit like standard boilerplate so just wanna check if this is intended or if I'm just missing another way of doing it. Link to comment Share on other sites More sharing options...
Doodlemeat Posted May 4, 2014 Share Posted May 4, 2014 I think the devs have missed it. It is hard to keep track of all the possible cases. Link to comment Share on other sites More sharing options...
tackle Posted May 4, 2014 Author Share Posted May 4, 2014 Do you think this should be reported as an issue at github?Rich, if you're reading this - any thought? Link to comment Share on other sites More sharing options...
Recommended Posts