diff --git a/stepmania/src/ScreenOptionsEditCourse.cpp b/stepmania/src/ScreenOptionsEditCourse.cpp index 1384beefc7..8b60e87eb8 100644 --- a/stepmania/src/ScreenOptionsEditCourse.cpp +++ b/stepmania/src/ScreenOptionsEditCourse.cpp @@ -153,28 +153,28 @@ void ScreenOptionsEditCourse::HandleScreenMessage( const ScreenMessage SM ) ScreenOptions::BeginFadingOut(); break; case CourseEntryAction_InsertEntry: - { - if( AreEntriesFull() ) - return; - CourseEntry ce; - CourseUtil::MakeDefaultEditCourseEntry( ce ); - pCourse->m_vEntries.insert( pCourse->m_vEntries.begin() + GetCourseEntryIndexWithFocus(), ce ); - SCREENMAN->SetNewScreen( this->m_sName ); // reload - } + { + if( AreEntriesFull() ) + return; + CourseEntry ce; + CourseUtil::MakeDefaultEditCourseEntry( ce ); + pCourse->m_vEntries.insert( pCourse->m_vEntries.begin() + GetCourseEntryIndexWithFocus(), ce ); + SCREENMAN->SetNewScreen( this->m_sName ); // reload break; + } case CourseEntryAction_Delete: + { + if( pCourse->m_vEntries.size() == 1 ) { - if( pCourse->m_vEntries.size() == 1 ) - { - ScreenPrompt::Prompt( SM_None, CANNOT_DELETE_LAST_ENTRY ); - return; - } - pCourse->m_vEntries.erase( pCourse->m_vEntries.begin() + GetCourseEntryIndexWithFocus() ); - GAMESTATE->m_iEditCourseEntryIndex.Set( GAMESTATE->m_iEditCourseEntryIndex ); - SCREENMAN->SetNewScreen( this->m_sName ); // reload + ScreenPrompt::Prompt( SM_None, CANNOT_DELETE_LAST_ENTRY ); + return; } + pCourse->m_vEntries.erase( pCourse->m_vEntries.begin() + GetCourseEntryIndexWithFocus() ); + GAMESTATE->m_iEditCourseEntryIndex.Set( GAMESTATE->m_iEditCourseEntryIndex ); + SCREENMAN->SetNewScreen( this->m_sName ); // reload break; } + } } } @@ -215,15 +215,15 @@ void ScreenOptionsEditCourse::ImportOptions( int iRow, const vectorGetCourseType() ); break; case EditCourseRow_Meter: - { - int iMeter = pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM]; - if( iMeter == -1 ) - row.SetOneSharedSelection( 0 ); - else - row.SetOneSharedSelection( iMeter + 1 - MIN_METER ); - } + { + int iMeter = pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM]; + if( iMeter == -1 ) + row.SetOneSharedSelection( 0 ); + else + row.SetOneSharedSelection( iMeter + 1 - MIN_METER ); break; } + } } void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector &vpns ) @@ -234,21 +234,21 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vectorSetCourseType( ct ); - } + { + CourseType ct = (CourseType)row.GetOneSharedSelection(); + pCourse->SetCourseType( ct ); break; + } case EditCourseRow_Meter: - { - int iSel = row.GetOneSharedSelection(); - if( iSel == 0 ) // "auto" - pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM] = -1; - else - pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM] = iSel - 1 + MIN_METER; - } + { + int iSel = row.GetOneSharedSelection(); + if( iSel == 0 ) // "auto" + pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM] = -1; + else + pCourse->m_iCustomMeter[DIFFICULTY_MEDIUM] = iSel - 1 + MIN_METER; break; } + } } void ScreenOptionsEditCourse::ProcessMenuStart( const InputEventPlus &input )