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


C++ MaterialDoc::RemoveStage方法代码示例

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


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

示例1: OnDeleteStage

/**
* Deletes the selected stage when the user selects the delete menu option.
*/
void StageView::OnDeleteStage() {
	CListCtrl &list = GetListCtrl();
	POSITION pos = list.GetFirstSelectedItemPosition();
	int nItem = -1;
	if( pos ) {
		nItem = list.GetNextSelectedItem( pos );
		if( nItem > 0 ) {
			int result = MessageBox( "Are you sure you want to delete this stage?", "Delete?", MB_ICONQUESTION | MB_YESNO );
			if( result == IDYES ) {
				MaterialDoc *material = materialDocManager->GetCurrentMaterialDoc();
				material->RemoveStage( nItem - 1 );
			}
		}
	}
}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:18,代码来源:StageView.cpp

示例2: OnPaste

/**
* Performs a paste operation when the user selects the menu option.
*/
void StageView::OnPaste() {
	if( materialDocManager->IsCopyStage() ) {
		MaterialDoc *material = materialDocManager->GetCurrentMaterialDoc();
		int type;
		idStr name;
		materialDocManager->GetCopyStageInfo( type, name );
		int existingIndex = material->FindStage( type, name );
		if( type != MaterialDoc::STAGE_TYPE_SPECIALMAP || existingIndex == -1 ) {
			materialDocManager->PasteStage( material );
		} else {
			if( MessageBox( va( "Do you want to replace '%s' stage?", name.c_str() ), "Replace?", MB_ICONQUESTION | MB_YESNO ) == IDYES ) {
				material->RemoveStage( existingIndex );
				materialDocManager->PasteStage( material );
			}
		}
	}
}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:20,代码来源:StageView.cpp

示例3: Undo

/**
* Performs an undo operation of an inserted stage.
*/
void StageInsertModifier::Undo()
{

	MaterialDoc *material = manager->CreateMaterialDoc(materialName);
	material->RemoveStage(stageNum, false);
}
开发者ID:AreaScout,项目名称:dante-doom3-odroid,代码行数:9,代码来源:MaterialModifier.cpp

示例4: Redo

/**
* Performs a redo operation of a deleted stage.
*/
void StageDeleteModifier::Redo()
{
	MaterialDoc *material = manager->CreateMaterialDoc(materialName);
	material->RemoveStage(stageNum, false);
}
开发者ID:AreaScout,项目名称:dante-doom3-odroid,代码行数:8,代码来源:MaterialModifier.cpp


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