diff --git a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp index ebca5a8839..e7c348583f 100644 --- a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp @@ -8,15 +8,22 @@ using namespace cocos2d; #define PROPERTY_MOUSE_ENABLED "isMouseEnabled" #define PROPERTY_KEYBOARD_ENABLED "isKeyboardEnabled" +#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif _MSC_VER >= 1400 //vs 2005 or higher +#pragma warning (push) +#pragma warning (disable: 4996) +#endif + using namespace cocos2d; namespace cocosbuilder { - + void LayerLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) { if(strcmp(pPropertyName, PROPERTY_TOUCH_ENABLED) == 0) { -// FIXME: ((Layer *)pNode)->setTouchEnabled(pCheck); + ((Layer *)pNode)->setTouchEnabled(pCheck); } else if(strcmp(pPropertyName, PROPERTY_ACCELEROMETER_ENABLED) == 0) { -// FIXME: ((Layer *)pNode)->setAccelerometerEnabled(pCheck); + ((Layer *)pNode)->setAccelerometerEnabled(pCheck); } else if(strcmp(pPropertyName, PROPERTY_MOUSE_ENABLED) == 0) { // TODO XXX CCLOG("The property '%s' is not supported!", PROPERTY_MOUSE_ENABLED); @@ -30,3 +37,9 @@ void LayerLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char } } + +#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#elif _MSC_VER >= 1400 //vs 2005 or higher +#pragma warning (pop) +#endif \ No newline at end of file