How to detect the right mouse button was clicked?


#1

Is it possible to detect when the right mouse button was clicked? I need to get the event and differentiate from left mouse button clicks, which I currently manage with ccTouchBegan.

Thanks!


#2

Good question. I would like to know that too!


#3

Go to cocos2dx/platform/XYZ/CCEGLView.cpp
You can modify void mouseButtonEventHandle(int iMouseID,int iMouseState) to forward iMouseID and iMouseState somewhere else (like notifiaction center, some singleton, etc.).