From c307d83b35b1ef79263cd29585e6bc06a5e385b3 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Tue, 19 Nov 2013 16:06:27 +0800 Subject: [PATCH] add miss Deprecated api --- cocos/2d/CCLayer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 63523ddc17..2fab5e8745 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -86,6 +86,18 @@ public: CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesEnded(Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} CC_DEPRECATED_ATTRIBUTE virtual void ccTouchesCancelled(Set *pTouches, Event *pEvent) final {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} + // Deprecated touch callbacks.There not have add CC_DEPRECATED_ATTRIBUTE because of menu still use these api + virtual bool onTouchBegan(Touch *touch, Event *event) final {CC_UNUSED_PARAM(touch); CC_UNUSED_PARAM(event); return false;} + virtual void onTouchMoved(Touch *touch, Event *event) final {CC_UNUSED_PARAM(touch); CC_UNUSED_PARAM(event);} + virtual void onTouchEnded(Touch *touch, Event *event) final {CC_UNUSED_PARAM(touch); CC_UNUSED_PARAM(event);} + virtual void onTouchCancelled(Touch *touch, Event *event) final {CC_UNUSED_PARAM(touch); CC_UNUSED_PARAM(event);} + + // Deprecated touch callbacks. + CC_DEPRECATED_ATTRIBUTE virtual void onTouchesBegan(const std::vector& touches, Event *event) final {CC_UNUSED_PARAM(touches); CC_UNUSED_PARAM(event);} + CC_DEPRECATED_ATTRIBUTE virtual void onTouchesMoved(const std::vector& touches, Event *event) final {CC_UNUSED_PARAM(touches); CC_UNUSED_PARAM(event);} + CC_DEPRECATED_ATTRIBUTE virtual void onTouchesEnded(const std::vector& touches, Event *event) final {CC_UNUSED_PARAM(touches); CC_UNUSED_PARAM(event);} + CC_DEPRECATED_ATTRIBUTE virtual void onTouchesCancelled(const std::vector&touches, Event *event) final {CC_UNUSED_PARAM(touches); CC_UNUSED_PARAM(event);} + /** @deprecated Please override onAcceleration */ CC_DEPRECATED_ATTRIBUTE virtual void didAccelerate(Acceleration* accelerationValue) final {};