///当点击CELL之后,判断是否点击到了某个菜单项,并置为选中状态 void CTableViewCell::selected(const CCPoint &touchPoint) { CCObject *pObject = NULL; CCARRAY_FOREACH_REVERSE(m_pArrItems, pObject) { CCMenuItem *pMenuItem = (CCMenuItem *) pObject; if(pMenuItem->isEnabled() && pMenuItem->isVisible()) { if(pMenuItem->boundingBox().containsPoint(touchPoint)) { pMenuItem->selected(); m_pTouchItem = pMenuItem; break; } } }