I have a problem with touch handling in cocos2d-x. i have two layers. one of them is a kind of workspace and another one is a toolbox that is on top of the workspace layer. both of them have special touch handling. when i click on the upper layer(toolbox), every thing is right but i can not click on the second layer(workspace). toolbox is a small area of the screen but when i click on the workspace layer, cocos2d calls the toolbox touch handler. i have used this command in toolbox and workspace
ToolBox::registerWithTouchDispatcher(){
CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDeligate(this,0,1);
}
i have a same code in workspace layer.if i change the third parameter of this function to 0, cocos2d will handle the workspace touches only and workspace will not work. thank you.