mirror of https://github.com/axmolengine/axmol.git
issue #5005, fix widget hittest problem
This commit is contained in:
parent
5d24b3d99a
commit
b2397f4059
|
@ -543,7 +543,7 @@ void Widget::didNotSelectSelf()
|
||||||
bool Widget::onTouchBegan(Touch *touch, Event *unusedEvent)
|
bool Widget::onTouchBegan(Touch *touch, Event *unusedEvent)
|
||||||
{
|
{
|
||||||
_hitted = false;
|
_hitted = false;
|
||||||
if (isEnabled() && isTouchEnabled())
|
if (isVisible() && isEnabled() && isTouchEnabled())
|
||||||
{
|
{
|
||||||
_touchStartPos = touch->getLocation();
|
_touchStartPos = touch->getLocation();
|
||||||
if(hitTest(_touchStartPos) && clippingParentAreaContainPoint(_touchStartPos))
|
if(hitTest(_touchStartPos) && clippingParentAreaContainPoint(_touchStartPos))
|
||||||
|
|
Loading…
Reference in New Issue