diff --git a/AUTHORS b/AUTHORS index d1a4d72cf8..6e7b400b64 100644 --- a/AUTHORS +++ b/AUTHORS @@ -312,6 +312,9 @@ Developers: Fixing a linking error that libpthread and libGL libraries need to be linked on linux. Fixing a compiling error of [-Werror=array-bounds] when compiling Box2dTestBed. + zhanghaojie + Fixing a bug that anchorPoint property of CCScale9Sprite doesn't work in CCBReader. + Retired Core Developers: WenSheng Yang Author of windows port, CCTextField, diff --git a/extensions/CCBReader/CCScale9SpriteLoader.cpp b/extensions/CCBReader/CCScale9SpriteLoader.cpp index ba0edf12ce..e936a58db4 100644 --- a/extensions/CCBReader/CCScale9SpriteLoader.cpp +++ b/extensions/CCBReader/CCScale9SpriteLoader.cpp @@ -17,7 +17,7 @@ NS_CC_EXT_BEGIN void CCScale9SpriteLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) { if(strcmp(pPropertyName, PROPERTY_SPRITEFRAME) == 0) { - ((CCScale9Sprite *)pNode)->initWithSpriteFrame(pCCSpriteFrame); + ((CCScale9Sprite *)pNode)->setSpriteFrame(pCCSpriteFrame); } else { CCNodeLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pCCSpriteFrame, pCCBReader); } @@ -72,4 +72,4 @@ void CCScale9SpriteLoader::onHandlePropTypeFloat(CCNode * pNode, CCNode * pParen } } -NS_CC_EXT_END \ No newline at end of file +NS_CC_EXT_END diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp index ca8243b379..ddd7e7e1c3 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp @@ -638,7 +638,7 @@ CCScale9Sprite* CCScale9Sprite::resizableSpriteWithCapInsets(CCRect capInsets) CCScale9Sprite* CCScale9Sprite::create() { CCScale9Sprite *pReturn = new CCScale9Sprite(); - if (pReturn) + if (pReturn && pReturn->init()) { pReturn->autorelease(); return pReturn;