Cocos2d-x handling input with multiple layers

Also if you want to manage all touches yourself, if you want to handle them all yourself you can either do so on your root Layer (2.x) or root Node (3.x, since a using a literal cocos2d::Layer is no longer necessary for touches). This is sometimes useful if you want to detect multiple taps, clicks, or gestures. You can even have your UI on a separate layer so that the Widgets/MenuItems/Buttons will handle their touches with higher priority if for example you have a game where you want to pan, zoom, and select units within your game play layer.

e.g. XTLayer :

Otherwise you may find benefit learning to use the touch handlers per object instead of globally with an InputManager.