mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2370 from dumganhar/iss2054-s9sp-anchorpoint-ccb
Fixed #2054: AnchorPoint property of CCScale9Sprite doesn't work in CCBReader.
This commit is contained in:
commit
d89b5cbcb2
3
AUTHORS
3
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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue