mirror of https://github.com/axmolengine/axmol.git
add constness to UIPageView
This commit is contained in:
parent
78ac4b4d86
commit
e1f9ff7eaa
|
@ -200,12 +200,12 @@ void PageView::updateBoundaryPages()
|
|||
_rightBoundaryChild = _pages.at(this->getPageCount()-1);
|
||||
}
|
||||
|
||||
ssize_t PageView::getPageCount()
|
||||
ssize_t PageView::getPageCount()const
|
||||
{
|
||||
return _pages.size();
|
||||
}
|
||||
|
||||
float PageView::getPositionXByIndex(ssize_t idx)
|
||||
float PageView::getPositionXByIndex(ssize_t idx)const
|
||||
{
|
||||
return (getSize().width * (idx-_curPageIdx));
|
||||
}
|
||||
|
|
|
@ -178,8 +178,8 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
protected:
|
||||
|
||||
Layout* createPage();
|
||||
float getPositionXByIndex(ssize_t idx);
|
||||
ssize_t getPageCount();
|
||||
float getPositionXByIndex(ssize_t idx)const;
|
||||
ssize_t getPageCount()const;
|
||||
|
||||
void updateBoundaryPages();
|
||||
virtual bool scrollPages(float touchOffset);
|
||||
|
|
Loading…
Reference in New Issue