当前位置: 首页>>代码示例>>C++>>正文


C++ CTileBank::getTileSetCount方法代码示例

本文整理汇总了C++中CTileBank::getTileSetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CTileBank::getTileSetCount方法的具体用法?C++ CTileBank::getTileSetCount怎么用?C++ CTileBank::getTileSetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTileBank的用法示例。


在下文中一共展示了CTileBank::getTileSetCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CTextureMem

CBankCont::CBankCont (CTileBank& bank, HINSTANCE hInstance)
{
	// Allocate bitmaps
	_smallBitmap	=	new CTextureMem ((uint8*)_small, _smallSize, false);
	mediumBitmap	=	new CTextureMem ((uint8*)medium, mediumSize, false);
	largeBitmap		=	new CTextureMem ((uint8*)large, largeSize, false);
	_256Bitmap		=	new CTextureMem ((uint8*)_256, _256Size, false);
	_128Bitmap		=	new CTextureMem ((uint8*)_128, _128Size, false);
	_0Bitmap		=	new CTextureMem ((uint8*)_0, _0Size, false);
	_1Bitmap		=	new CTextureMem ((uint8*)_1, _1Size, false);
	_2Bitmap		=	new CTextureMem ((uint8*)_2, _2Size, false);
	_3Bitmap		=	new CTextureMem ((uint8*)_3, _3Size, false);
	_4Bitmap		=	new CTextureMem ((uint8*)_4, _4Size, false);
	_5Bitmap		=	new CTextureMem ((uint8*)_5, _5Size, false);
	_6Bitmap		=	new CTextureMem ((uint8*)_6, _6Size, false);
	_7Bitmap		=	new CTextureMem ((uint8*)_7, _7Size, false);
	_8Bitmap		=	new CTextureMem ((uint8*)_8, _8Size, false);
	_9Bitmap		=	new CTextureMem ((uint8*)_9, _9Size, false);
	_10Bitmap		=	new CTextureMem ((uint8*)_10, _10Size, false);
	_11Bitmap		=	new CTextureMem ((uint8*)_11, _11Size, false);
	allBitmap		=	new CTextureMem ((uint8*)all, allSize, false);
	lightBitmap		=	new CTextureMem ((uint8*)light, lightSize, false);
	lockBitmap		=	new CTextureMem ((uint8*)lock, lockSize, false);
	orientedBitmap	=	new CTextureMem ((uint8*)oriented, orientedSize, false);
	nothingBitmap	=	new CTextureMem ((uint8*)nothing, nothingSize, false);
	regularBitmap	=	new CTextureMem ((uint8*)regular, regularSize, false);
	goofyBitmap		=	new CTextureMem ((uint8*)goofy, goofySize, false);

	// Resize the tileset array
	TileSet.resize (bank.getTileSetCount());

	// For each tileSet, build the cont
	for (int tileSet=0; tileSet<bank.getTileSetCount(); tileSet++)
		TileSet[tileSet].build (bank, tileSet);

	// Load cursors
	HInspect = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_INSPECT));
	HCur = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_PICK_COLOR));
	HFill = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_FILL));
	HTrick = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_TRICK));
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:41,代码来源:paint_ui.cpp

示例2: on_editLandPushButton_clicked

void CTile_edit_dlg::on_editLandPushButton_clicked()
{
	int nindex = ui.landListWidget->currentRow();
	if (nindex != -1) 
	{
		QStringList availableTileSetList;
		QStringList landTileSetList;
		for (int i=0; i<tileBank.getTileSetCount(); i++)
		{
			if (tileBank.getLand(nindex)->isTileSet (tileBank.getTileSet(i)->getName()))
				landTileSetList.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
			else
				availableTileSetList.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
		}

		bool ok = false;
		QStringList items = CItems_edit_dlg::getItems(this, tr("Edit Land"), ui.landListWidget->item(nindex)->text(), availableTileSetList, landTileSetList, &ok);

		if (ok)
		{
			for (int i=0; i<tileBank.getTileSetCount(); i++)
			{
				// remove tile set
				tileBank.getLand(nindex)->removeTileSet (tileBank.getTileSet(i)->getName());
			}
			for (int i=0; i<items.count(); i++)
			{
				QString rString = items[i];
				tileBank.getLand(nindex)->addTileSet( rString.toUtf8().constData() );
			}
		}
	}
	else
	{
		QMessageBox::information( this, tr("No Land Selected"), tr("Please, select the Land to edit first ...") );
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:37,代码来源:tile_edit_dlg.cpp

示例3: on_loadPushButton_clicked

void CTile_edit_dlg::on_loadPushButton_clicked()
{
	QFileDialog::Options options;
	QString selectedFilter;
	QString fileName = QFileDialog::getOpenFileName(this, tr("Open Bank"), ui.absolutePathPushButton->text() , tr("NeL tile bank files (*.bank);;All Files (*.*);;"), &selectedFilter, options);
	
	if (!fileName.isEmpty())
	{
		CIFile stream;
		if ( stream.open( fileName.toUtf8().constData() ) )
		{
			ui.landListWidget->clear();
			ui.tileSetListWidget->clear();
			tileBank.clear();
			tileBank.serial (stream);
		}
		
		int i;
		QStringList lands;
		for (i=0; i<tileBank.getLandCount(); i++)
		{
			// Add to the list
			lands.append( QString(tileBank.getLand(i)->getName().c_str()) );
		}
		ui.landListWidget->addItems(lands);


		QStringList tileSets;
		for (i=0; i<tileBank.getTileSetCount(); i++)
		{
			// Add to the list
			tileSets.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
		}
		ui.tileSetListWidget->addItems(tileSets);

		// Set MainFile
		mainFile = QFileInfo(fileName);

		ui.savePushButton->setEnabled(true);
		ui.absolutePathPushButton->setText( QString( tileBank.getAbsPath().c_str() ) );
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:42,代码来源:tile_edit_dlg.cpp


注:本文中的CTileBank::getTileSetCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。