Add HideIncompleteCourses; in some environments, it doesn't make sense to show incomplete courses.

This commit is contained in:
Glenn Maynard
2008-05-13 01:26:02 +00:00
parent de4dec1f7b
commit d03587dd30
3 changed files with 11 additions and 0 deletions
+8
View File
@@ -53,6 +53,7 @@ static const ThemeMetric<bool> MOVE_UNLOCKS_TO_BOTTOM_OF_PREFERRED_SORT ( "Song
static const ThemeMetric<int> EXTRA_STAGE2_DIFFICULTY_MAX ( "SongManager", "ExtraStage2DifficultyMax" );
static Preference<RString> g_sDisabledSongs( "DisabledSongs", "" );
static Preference<bool> g_bHideIncompleteCourses( "HideIncompleteCourses", false );
RString SONG_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "SongGroupColor%i", (int) i+1 ); }
RString COURSE_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "CourseGroupColor%i", (int) i+1 ); }
@@ -705,6 +706,13 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
Course* pCourse = new Course;
CourseLoaderCRS::LoadFromCRSFile( *sCoursePath, *pCourse );
if( g_bHideIncompleteCourses.Get() && pCourse->m_bIncomplete )
{
delete pCourse;
continue;
}
m_pCourses.push_back( pCourse );
}
}