From b2397f40592fe25dcc90b0a36a646a51e6f00749 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 13 May 2014 12:04:43 +0800 Subject: [PATCH] issue #5005, fix widget hittest problem --- cocos/ui/UIWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp index 14d7f63597..fd1f58a70f 100644 --- a/cocos/ui/UIWidget.cpp +++ b/cocos/ui/UIWidget.cpp @@ -543,7 +543,7 @@ void Widget::didNotSelectSelf() bool Widget::onTouchBegan(Touch *touch, Event *unusedEvent) { _hitted = false; - if (isEnabled() && isTouchEnabled()) + if (isVisible() && isEnabled() && isTouchEnabled()) { _touchStartPos = touch->getLocation(); if(hitTest(_touchStartPos) && clippingParentAreaContainPoint(_touchStartPos))