Example #1
0
CTableView* TuiManager::createTableView(float tag, const char* img, int dir, int num, int cellWidth, int cellHeight, float x, float y, float w, float h, float rotation){
	CTableView *pView = CTableView::create(Size(w, h));
	m_isUseSpriteFrame ? pView->setBackgroundSpriteFrameName(img) : pView->setBackgroundImage(img);
	pView->setAutoRelocate(true);
	pView->setRotation(rotation);
	pView->setDirection((CScrollViewDirection)dir);
	pView->setCountOfCell(num);
	pView->setSizeOfCell(Size(cellWidth, cellHeight));
	pView->setRotation(rotation);
	pView->setPosition(x, -y);
	pView->setTag(tag);
	return pView;
}
Example #2
0
CTableView* TuiManager::createTableView(float tag, Color4B color, int dir, int num, int cellWidth, int cellHeight, float x, float y, float w, float h, float rotation){
	CTableView *pView = CTableView::create(Size(w,h));
	if (color.a != 0) pView->setBackgroundColor(color);
	pView->setAutoRelocate(true);
	pView->setRotation(rotation);
	pView->setDirection((CScrollViewDirection)dir);
	pView->setCountOfCell(num);
	pView->setSizeOfCell(Size(cellWidth, cellHeight));
	pView->setRotation(rotation);
	pView->setPosition(x,-y);
	pView->setTag(tag);
	return pView;
}