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


C++ Course::GetTrailForceRegenCache方法代码示例

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


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

示例1: ProcessMenuStart

void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input )
{
	if( IsTransitioning() )
		return;

	int iRow = m_iCurrentRow[GAMESTATE->GetMasterPlayerNumber()];
	switch( iRow )
	{
	case CourseOverviewRow_Play:
	case CourseOverviewRow_Edit:
		SCREENMAN->PlayStartSound();
		this->BeginFadingOut();
		return;	// handled
	case CourseOverviewRow_Shuffle:
		{
			Course *pCourse = GAMESTATE->m_pCurCourse;
			random_shuffle( pCourse->m_vEntries.begin(), pCourse->m_vEntries.end() );
			Trail *pTrail = pCourse->GetTrailForceRegenCache( GAMESTATE->GetCurrentStyle(input.pn)->m_StepsType );
			GAMESTATE->m_pCurTrail[PLAYER_1].Set( pTrail );
			SCREENMAN->PlayStartSound();
			MESSAGEMAN->Broadcast("CurrentCourseChanged");
		}
		return;	// handled
	case CourseOverviewRow_Rename:
		ScreenTextEntry::TextEntry(
				SM_BackFromRename,
				ENTER_COURSE_NAME.GetValue(),
				GAMESTATE->m_pCurCourse->GetDisplayFullTitle(),
				EditCourseUtil::MAX_NAME_LENGTH,
				EditCourseUtil::ValidateEditCourseName );
		break;
	case CourseOverviewRow_Delete:
		ScreenPrompt::Prompt( SM_BackFromDelete, COURSE_WILL_BE_LOST.GetValue()+"\n\n"+CONTINUE_WITH_DELETE.GetValue(), PROMPT_YES_NO, ANSWER_NO );
		break;
	case CourseOverviewRow_Save:
		{
			bool bPromptForName = EditCourseUtil::s_bNewCourseNeedsName;
			if( bPromptForName )
			{
				ScreenTextEntry::TextEntry(
					SM_BackFromEnterName,
					ENTER_COURSE_NAME.GetValue(),
					GAMESTATE->m_pCurCourse->GetDisplayFullTitle(),
					EditCourseUtil::MAX_NAME_LENGTH,
					EditCourseUtil::ValidateEditCourseName );
			}
			else
			{
				if( EditCourseUtil::Save( GAMESTATE->m_pCurCourse ) )
				{
					m_soundSave.Play(true);
					SCREENMAN->SystemMessage( COURSE_SAVED.GetValue() );
				}
				else
				{
					SCREENMAN->PlayInvalidSound();
					SCREENMAN->SystemMessage( ERROR_SAVING_COURSE.GetValue() );
				}
			}
		}
		return;	// handled
	}

	ScreenOptions::ProcessMenuStart( input );
}
开发者ID:hanubeki,项目名称:stepmania,代码行数:65,代码来源:ScreenOptionsCourseOverview.cpp


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