Exemplo n.º 1
0
	void CCScrollLayer::updatePages()
	{
		// Loop through the array and add the screens if needed.
		int i = 0;
		CCObject* object = NULL;
		CCARRAY_FOREACH(m_pLayers, object)
		{
			CCLayer* layer = (CCLayer*)object;
			layer->setAnchorPoint(ccp(0,0));
			layer->setContentSize(CCDirector::sharedDirector()->getWinSize());
			layer->setPosition(ccp((i * (m_tContentSize.width - m_fPagesWidthOffset)), 0));
			if (!layer->getParent())
				addChild(layer);
			i++;
		}