mirror of https://github.com/axmolengine/axmol.git
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:
parent
865e780921
commit
fbb4d02251
|
@ -28,7 +28,13 @@ protected:
|
|||
* @js 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
|
||||
* @lua NA
|
||||
|
|
Loading…
Reference in New Issue