rpiller Posted April 18, 2014 Share Posted April 18, 2014 I see code for mouse clicking like://listen for pointersgame.input.onDown.add(handlePointerDown)//handle a touch/clickhandlePointerDown = function(pointer){//this is the test, contains test for a point belonging to a rect definitionvar inside = topLeftQuarter.contains(pointer.x,pointer.y)//do whatever with the resultconsole.log('pointer is inside region top left quarter', inside)}However, this seems to register keys as well. I don't want that since I'm using addKey/onDown for that. Also how would you tell if it's left or right mouse button down? Link to comment Share on other sites More sharing options...
rpiller Posted April 19, 2014 Author Share Posted April 19, 2014 Does anyone know how I can register an on left mouse button down? Link to comment Share on other sites More sharing options...
Recommended Posts