From 4c67fd979e17ea1673f8f08db9b71dfbfe30c359 Mon Sep 17 00:00:00 2001 From: zhanghaojie Date: Fri, 5 Apr 2013 23:58:23 +0800 Subject: [PATCH 1/3] fix property anchorPoint of CCScale9Sprite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix property anchorPoint of CCScale9Sprite doesn't work in ccb. Because initSpriteFrame method reset anchor point --- extensions/CCBReader/CCScale9SpriteLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From b7e16e9895949fd4d7395ca9b7cc017c46666989 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 15 Apr 2013 11:51:26 +0800 Subject: [PATCH 2/3] Fixed #2054: AnchorPoint property of CCScale9Sprite doesn't work in CCBReader. Invoking init method in CCScale9Sprite::create(). --- extensions/GUI/CCControlExtension/CCScale9Sprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 7a676982db8fee077a189b450bec0450cf2467ca Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 15 Apr 2013 11:51:47 +0800 Subject: [PATCH 3/3] Updating AUTHORS. --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index eaf5ec4d3f..aa40c5441d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -311,6 +311,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,