Merge pull request #438 from natural-law/master

Use the setter to set the value of m_tAnchorPoint.
This commit is contained in:
minggo 2011-08-01 21:39:43 -07:00
commit 9fe868b881
7 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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

View File

@ -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)
{

View File

@ -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;

View File

@ -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;