When a sprite object is added TOUCH and MOUSE_DOWN events at the same time, it seems that when the mouse right button is down, touch event also occurs. How to ban occurring touch event when the mouse right button is clicked ?
I did. If the second checkbox is unchecked, both left- and right-button clicks do not occur touch event. I want left-click raises touch event and right-click does not (solar2d simulator works like that)
You can't avoid the TOUCH event, but you can check the mouseButtton field of the touch event and stop processing if it was a right click or a middle click
You can't avoid the TOUCH event, but you can check the mouseButtton field of the touch event and stop processing if it was a right click or a middle click
Thank you. I can solve the problem by checking touch.mouseButton==2 (mouse right-click) in the touch callback function.
Comments
Likes: MoKaLux, salesiopark
Likes: MoKaLux