cocos2d. How to create a popup modal dialog (with CCLayer)
I need to make a modal dialog(inherited from CCLayer) that is showing in the center of the main layer. While it is showing, you can not press any other button outside the dialog. Just like a normal modal window in MS Windows System. The problem is that I can not figure out how to disable the mainlayer's touch events while the dialog is showing. Any help would be aprreciated. Just set self.isTouchEnabled = NO; in the main layer while the popup is displayed. Then later set it back to YES. Oren Bengigi This works for me in Cocos2d-x but can be adapted to Cocos2d too. I've change setParent to: