Problem with touch

Problem with touch
0.0 0



I have some problem with implementing the touch in cocos2d-x. I have implemented function in the same form as in the Paddle.cpp in the Touch tests.
It looks like this:
void Paddle::ccTouchEnded(CCTouch* touch, UIEvent* event);
I used the debugger and I see that when I touch the screen with mouse the touchEnded event doesn’t work. It works well when I run the Touch test.
Please, help me to implement it in right way or give some other solutions.

Edit: I have solved the problem! But I didn’t know at all which thing that I have changed solved it…
I have created such function:
void HelloWorld::ccTouchesEnded(cocos2d::NSSet pTouches, cocos2d::UIEvent event);
and declared this:
bool containsTouchLocation(cocos2d::CCTouch* touch);
and the HelloWorld class cannot inherit from CCTargetedTouchDelegate. (in my case)


You can read this document[]=targeted&s[]=standard and make sure the difference between targeted & standard touch delegate.
For your previous usage, a targeted delegate, more code is required to enable this delegate. Plz overwrite this method

void Paddle::registerWithTouchDispatcher()
    CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true);

Sorry for the late reply.