Hello. i’m trying to set a lower touch priority to CCMenu but it crashes everytime becouse it is not registered as a touch listener. Why there is a such weird registration system? Why not let EVERY control derive from a single object which have a touch priority setter and getter? You’ve ignored my post( http://www.cocos2d-x.org/boards/6/topics/12092 ) about button touch priority but it is only one logical solution. The code in the init method
CCMenuItemLabel * quit = CCMenuItemLabel::create(CCLabelTTF::create(TR("Cancel"), "FontName", 18), this, menu_selector(Settings::onCancel));
CCMenuItemLabel * save = CCMenuItemLabel::create(CCLabelTTF::create(TR("Save"), "FontName", 18), this, menu_selector(Settings::onSave));
CCMenu * menu = CCMenu::create(quit, save, NULL);
menu->alignItemsHorizontallyWithPadding(130);
menu->setPosition(ccp( size.width / 2, size.height / 2 ));
this->addChild(menu);
menu->setHandlerPriority(kCCMenuHandlerPriority - 1); //Crash!
You are setting a touch priority from a constant and i think it is not a good solution to create user interface.