CCControlButton responds even if its parent is invisible

The Buttons should not respond if its invisble or if its made invisible
by any of its parent in the hierarchi
This commit is contained in:
harikrishnar 2013-04-09 00:27:53 +05:30
parent 38cb350d39
commit cd37569729
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ void CCControlButton::needsLayout()
bool CCControlButton::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent)
{
if (!isTouchInside(pTouch) || !isEnabled() || !isVisible())
if (!isTouchInside(pTouch) || !isEnabled() || !isVisible() || !hasVisibleParents() )
{
return false;
}