WombatTurkey Posted October 13, 2015 Share Posted October 13, 2015 Is it possible to enable something similar topointer-events:none(https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events) in phaser? For example, if you draw a sprite on top of another graphic or sprite, or whatever but the below graphic has an onInputUp event on it, but you're clicking the graphic on top but you can still fire the event below it. I've tried sprite.inputEnabled = false;Edit: I've searched the forums for pointer events but it lead back to this topic lol Link to comment Share on other sites More sharing options...
Cudabear Posted October 13, 2015 Share Posted October 13, 2015 I don't think there's any such thing as a general flag like you say, but have a look at this:http://phaser.io/examples/v2/input/input-priority Link to comment Share on other sites More sharing options...
MattMcFarland Posted October 13, 2015 Share Posted October 13, 2015 I wonder if there is a way to control event bubbling?? Or perhaps create layers that block each other?? Link to comment Share on other sites More sharing options...
WombatTurkey Posted October 13, 2015 Author Share Posted October 13, 2015 I don't think there's any such thing as a general flag like you say, but have a look at this:http://phaser.io/examples/v2/input/input-priority Wow it does work. It's like a mini pointer events method. I need it for skills because I don't want players clicking on skills and not being able to move to that particular point in the map. Thank you so much. Cudabear and MichaelD 2 Link to comment Share on other sites More sharing options...
drhayes Posted October 14, 2015 Share Posted October 14, 2015 BTW: Are those little Donald Trump heads? 'Cuz that's hilarious. makis 1 Link to comment Share on other sites More sharing options...
WombatTurkey Posted October 14, 2015 Author Share Posted October 14, 2015 BTW: Are those little Donald Trump heads? 'Cuz that's hilarious. Placeholders yes. But I think I will have a future official skill called Trump Thrower or something. I need to look up on celebrity public usage laws first as I don't want to get sued / dmca'd Although, I don't think Trump minds the publicity Link to comment Share on other sites More sharing options...
Recommended Posts