mirror of https://github.com/axmolengine/axmol.git
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:
parent
38cb350d39
commit
cd37569729
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue