We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
A layer can't registered as a StandardTouchDelegate when touch event is handling
A layer can't registered as a StandardTouchDelegate when touch event is handling
Bug #371 [Closed]
- Target version set to 9
- Subject changed from A bug of CCTouchDelegate to A layer can't registered as a StandardTouchDelegate when touch event is handling
- Category set to 5
- Status changed from New to Closed
Have been fixed in issue #467.
- Assignee set to walzer@cocos2d-x.org
- Target version changed from 9 to cocos2d-0.99.5-x-0.8.3
- Project changed from cocos2d-x to cpp
- Category deleted (
5) - Target version deleted (
cocos2d-0.99.5-x-0.8.3)
Status: | Closed | |
---|---|---|
Start date: | 2011-03-01 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 0% |
|
Category: | - | |
Target version: | - |
If a layer is touch enabled and you want show it when a menu item clicked.
Then it’s not registered as a StandardTouchDelegate,but a TargetedTouchDelegate.
The code which cause the bug is in CCTouchDispatcher.cpp, line 372:
The return value of code “pHandler->getDelegate()->getTouchDelegateType() & ccTouchDelegateTargetedBit” is always true.So the layer is register as a TargetedTouchDelegate.