mirror of https://github.com/axmolengine/axmol.git
issue #1381: change the setContentSize interface in CCScrollView
This commit is contained in:
parent
9949a34669
commit
5bc130dee7
|
@ -357,7 +357,7 @@ void CCNode::setAnchorPoint(const CCPoint& point)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// contentSize getter
|
/// contentSize getter
|
||||||
CCSize CCNode::getContentSize()
|
const CCSize & CCNode::getContentSize()
|
||||||
{
|
{
|
||||||
return m_tContentSize;
|
return m_tContentSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
this->setViewSize(size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,8 +206,8 @@ public:
|
||||||
virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
|
virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent);
|
||||||
virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent);
|
virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent);
|
||||||
|
|
||||||
virtual void setContentSize(CCSize size);
|
virtual void setContentSize(const CCSize & size);
|
||||||
virtual CCSize getContentSize();
|
virtual const CCSize & getContentSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether it clips its children or not.
|
* Determines whether it clips its children or not.
|
||||||
|
|
Loading…
Reference in New Issue