issue #1381: change the setContentSize interface in CCScrollView

This commit is contained in:
mustime 2012-07-27 18:20:11 +08:00
parent 9949a34669
commit 5bc130dee7
3 changed files with 6 additions and 6 deletions

View File

@ -357,7 +357,7 @@ void CCNode::setAnchorPoint(const CCPoint& point)
}
/// contentSize getter
CCSize CCNode::getContentSize()
const CCSize & CCNode::getContentSize()
{
return m_tContentSize;
}

View File

@ -449,12 +449,12 @@ void CCScrollView::performedAnimatedScroll(float dt)
}
CCSize CCScrollView::getContentSize()
const CCSize & CCScrollView::getContentSize()
{
return CCSizeMake(m_pContainer->getContentSize().width, m_pContainer->getContentSize().height);
return m_pContainer->getContentSize();
}
void CCScrollView::setContentSize(CCSize size)
void CCScrollView::setContentSize(const CCSize & size)
{
this->setViewSize(size);
}

View File

@ -206,8 +206,8 @@ public:
virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent);
virtual void setContentSize(CCSize size);
virtual CCSize getContentSize();
virtual void setContentSize(const CCSize & size);
virtual const CCSize & getContentSize();
/**
* Determines whether it clips its children or not.