mirror of https://github.com/axmolengine/axmol.git
Merge pull request #438 from natural-law/master
Use the setter to set the value of m_tAnchorPoint.
This commit is contained in:
commit
9fe868b881
|
@ -411,7 +411,7 @@ namespace cocos2d{
|
|||
m_tColor = ccWHITE;
|
||||
m_tContentSize = CCSizeZero;
|
||||
m_bIsOpacityModifyRGB = m_pobTextureAtlas->getTexture()->getHasPremultipliedAlpha();
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
this->setString(theString);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ CCLayer::CCLayer()
|
|||
,m_bIsKeypadEnabled(false)
|
||||
{
|
||||
m_eTouchDelegateType = ccTouchDelegateAllBit;
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
m_bIsRelativeAnchorPoint = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace cocos2d {
|
|||
CCScene::CCScene()
|
||||
{
|
||||
m_bIsRelativeAnchorPoint = false;
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
m_eSceneType = ccNormalScene;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace cocos2d{
|
|||
CCSize s = CCDirector::sharedDirector()->getWinSize();
|
||||
|
||||
this->m_bIsRelativeAnchorPoint = false;
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
this->setContentSize(s);
|
||||
|
||||
// XXX: in v0.7, winSize should return the visible size
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace cocos2d{
|
|||
}
|
||||
bool CCMenuItem::initWithTarget(SelectorProtocol *rec, SEL_MenuHandler selector)
|
||||
{
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
m_pListener = rec;
|
||||
m_pfnSelector = selector;
|
||||
m_bIsEnabled = true;
|
||||
|
@ -567,7 +567,7 @@ namespace cocos2d{
|
|||
m_pNormalImage->setIsVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CCMenuItemImage * CCMenuItemImage::itemFromNormalImage(const char *normalImage, const char *selectedImage)
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ bool CCProgressTimer::initWithTexture(cocos2d::CCTexture2D *pTexture)
|
|||
m_fPercentage = 0.f;
|
||||
m_pVertexData = NULL;
|
||||
m_nVertexDataCount = 0;
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
setContentSize(m_pSprite->getContentSize());
|
||||
m_eType = kCCProgressTimerTypeRadialCCW;
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ bool CCSprite::init(void)
|
|||
m_pAnimations = NULL;
|
||||
|
||||
// default transform anchor: center
|
||||
m_tAnchorPoint = ccp(0.5f, 0.5f);
|
||||
setAnchorPoint(ccp(0.5f, 0.5f));
|
||||
|
||||
// zwoptex default values
|
||||
m_obOffsetPositionInPixels = CCPointZero;
|
||||
|
|
Loading…
Reference in New Issue