When anchor point is 0,0 , CocosBuilder will not output anchor point param setting request.Although the Scale9Sprite`s anchor point is default to 0, 0, but when calling function "initWithBatchNode", the anchor point will be set to 0.5, 0.5.

This commit is contained in:
garfield_ho 2013-11-13 14:38:01 +08:00
parent 865e780921
commit fbb4d02251
1 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,13 @@ protected:
* @js NA * @js NA
* @lua NA * @lua NA
*/ */
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::extension::Scale9Sprite); virtual cocos2d::extension::Scale9Sprite * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) {
cocos2d::extension::Scale9Sprite* pNode = cocos2d::extension::Scale9Sprite::create();
pNode->setAnchorPoint(cocos2d::Point(0,0));
return pNode;
};
/** /**
* @js NA * @js NA
* @lua NA * @lua NA