mirror of https://github.com/axmolengine/axmol.git
CCScale9Sprite: Moved anchorpoint initialization back to updateWithBatchNode, since this is probably the intended location, but causes problems due to the order properties appear in the CCBI file format.
This commit is contained in:
parent
8678a14b6e
commit
948fcc3d07
|
@ -21,7 +21,7 @@ CCScale9Sprite::CCScale9Sprite()
|
|||
, m_insetRight(0)
|
||||
, m_insetBottom(0)
|
||||
{
|
||||
this->setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
|
||||
}
|
||||
|
||||
CCScale9Sprite::~CCScale9Sprite()
|
||||
|
@ -39,6 +39,7 @@ bool CCScale9Sprite::initWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect
|
|||
if(batchnode)
|
||||
{
|
||||
this->updateWithBatchNode(batchnode, rect, capInsets);
|
||||
this->setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
}
|
||||
this->m_positionsAreDirty = true;
|
||||
|
||||
|
@ -96,7 +97,6 @@ bool CCScale9Sprite::updateWithBatchNode(CCSpriteBatchNode* batchnode, CCRect re
|
|||
m_originalSize = rect.size;
|
||||
m_preferredSize = m_originalSize;
|
||||
m_capInsetsInternal = capInsets;
|
||||
this->setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
|
||||
// If there is no specified center region
|
||||
if ( CCRect::CCRectEqualToRect(m_capInsetsInternal, CCRectZero) )
|
||||
|
|
|
@ -86,7 +86,7 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
virtual void setContentSize(const CCSize &size);
|
||||
virtual void setContentSize(const CCSize & size);
|
||||
virtual void visit();
|
||||
|
||||
virtual bool init();
|
||||
|
|
Loading…
Reference in New Issue