diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index 73f482d987..6c33a636d5 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -309,9 +309,9 @@ THE SOFTWARE. #define CC_USE_WEBP 1 #endif // CC_USE_WEBP -/** Enable Script binding. v4 or engine-x already remove js, leave follow always 0 */ +/** Enable Lua Script binding */ #ifndef CC_ENABLE_SCRIPT_BINDING -#define CC_ENABLE_SCRIPT_BINDING 0 +#define CC_ENABLE_SCRIPT_BINDING 1 #endif /** When CC_ENABLE_SCRIPT_BINDING and CC_ENABLE_GC_FOR_NATIVE_OBJECTS are both 1 diff --git a/extensions/fairygui/display/FUIContainer.cpp b/extensions/fairygui/display/FUIContainer.cpp index d88ed01b5e..8ad1588d1e 100644 --- a/extensions/fairygui/display/FUIContainer.cpp +++ b/extensions/fairygui/display/FUIContainer.cpp @@ -211,7 +211,7 @@ void FUIContainer::setInverted(bool inverted) void FUIContainer::onEnter() { -#if CC_ENABLE_SCRIPT_BINDING +#if CC_ENABLE_SCRIPT_BINDING && COCOS2D_VERSION < 0x00040000 if (_scriptType == kScriptTypeJavascript) { if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnter)) @@ -230,7 +230,7 @@ void FUIContainer::onEnter() void FUIContainer::onEnterTransitionDidFinish() { -#if CC_ENABLE_SCRIPT_BINDING +#if CC_ENABLE_SCRIPT_BINDING && COCOS2D_VERSION < 0x00040000 if (_scriptType == kScriptTypeJavascript) { if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnterTransitionDidFinish)) @@ -248,7 +248,7 @@ void FUIContainer::onEnterTransitionDidFinish() void FUIContainer::onExitTransitionDidStart() { -#if CC_ENABLE_SCRIPT_BINDING +#if CC_ENABLE_SCRIPT_BINDING && COCOS2D_VERSION < 0x00040000 if (_scriptType == kScriptTypeJavascript) { if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnExitTransitionDidStart)) @@ -263,7 +263,7 @@ void FUIContainer::onExitTransitionDidStart() void FUIContainer::onExit() { -#if CC_ENABLE_SCRIPT_BINDING +#if CC_ENABLE_SCRIPT_BINDING && COCOS2D_VERSION < 0x00040000 if (_scriptType == kScriptTypeJavascript) { if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnExit))