Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

left mouse down


rpiller
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

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