Anyway to do multi-touch in cocos2d-x 3.x? I want to be able to touch 2 menu items at the same time.
Appreciate any suggestions or possible solutions?
I am hoping not to roll my own
Thanks!
Anyway to do multi-touch in cocos2d-x 3.x? I want to be able to touch 2 menu items at the same time.
Appreciate any suggestions or possible solutions?
I am hoping not to roll my own
Thanks!
If you add the menu items to separate Menu’s, and you have multi-touch enabled for the platform, then you can subclass the menu item type you want and override the selected and unselected methods:
virtual void selected();
virtual void unselected();
For some goofy reason, in Cocos2d-x, multi-touch is disabled by default on iOS and enabled by default on Android and WP8.1. I opened a github issue for it a while back, but it was closed with no resolution.
If that doesnt meet your needs, you might want to look into this:
Hi Heyalda,
AWESOME that works! Thank you very much!!
For the “touch pad” solution I just check on update() if button is selected or not calling selected()