Right mouse clicks are not detected

Right mouse clicks are not detected
0.0 0


I’ve 2 problems right now:

  1. I’m using onTouchesBegan:function{} to detect mouse clicks, but I can’t differentiate between right & left mouse clicks.
  2. When I right click on canvas on the Browser, it shows a context menu (a small menu that has the following elements: save as, inspect element, …). How can I disable it.

  1. Because touch event is a click event, It doesn’t distinguish right & left mouse clicks. This design is compatible with mobile touch. If you want distinguish right & left mouse clicks, you can register mouse event on cc.Layer by setMouseEnabled function. we will add some API for right click soon.
  2. We will add a function to enable/disable context menu for Canvas.