CCMenu problem with touches.

CCMenu problem with touches.
0.0 0


Hi! Please help to solve the problem.
I have a scene in which there is one layer in which the CCMenu.After clicking the button, I add a new scene translucent layer, and calls setTouchEnabled (false) for the first layer. CCMenu elements remain active as before. Is this a bug or normal behavior?


CCMenu has higher touch priority than a CCLayer, so the touch dispatcher calls it first.
The default priority for a menu is ‘~~128’, and the lower the priority the faster something will get the touch. If you want your new overlay layaer to get the touches first, you should set its priority to something lower then that of CCMenu, for example ’~~129’.
You could also store a pointer to a CCMenu and call `setTouchEnabled(false)` on it.