mirror of https://github.com/axmolengine/axmol.git
fix touches not working in cocosbuilder
This commit is contained in:
parent
dc42645afe
commit
23f36e0406
|
@ -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
|
Loading…
Reference in New Issue