diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp index 564caca608..52bb9e2c5e 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp @@ -1399,9 +1399,9 @@ void ActionStacked::onEnter() this->centerSprites(0); - /*auto listener = EventListenerTouchAllAtOnce::create(); + auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesEnded = CC_CALLBACK_2(ActionStacked::onTouchesEnded, this); - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);*/ + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); auto s = Director::getInstance()->getWinSize(); this->addNewSpriteWithCoords(Vec2(s.width/2, s.height/2)); @@ -1427,14 +1427,13 @@ void ActionStacked::runActionsInSprite(Sprite *sprite) // override me } -/* void ActionStacked::onTouchesEnded(const std::vector& touches, Event* event) { for ( auto &touch: touches ) { auto location = touch->getLocation(); addNewSpriteWithCoords( location ); } -}*/ +} std::string ActionStacked::title() const { diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h index cc3830e87e..c639ced391 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h @@ -405,7 +405,7 @@ public: virtual std::string subtitle() const override; virtual void addNewSpriteWithCoords(cocos2d::Vec2 p); virtual void runActionsInSprite(cocos2d::Sprite* sprite); - //void onTouchesEnded(const std::vector& touches, cocos2d::Event* event) override; + void onTouchesEnded(const std::vector& touches, cocos2d::Event* event); }; class ActionMoveStacked : public ActionStacked