If CreateNewScreen is empty, use old behavior, otherwise set the screen named.
This commit is contained in:
@@ -416,31 +416,35 @@ void ScreenOptionsManageCourses::ProcessMenuStart( const InputEventPlus &input )
|
|||||||
|
|
||||||
if( iCurRow == 0 ) // "create new"
|
if( iCurRow == 0 ) // "create new"
|
||||||
{
|
{
|
||||||
SCREENMAN->SetNewScreen( CREATE_NEW_SCREEN );
|
if( !CREATE_NEW_SCREEN.GetValue().empty() )
|
||||||
/*
|
|
||||||
if( SONGMAN->GetNumEditCourses(ProfileSlot_Machine) >= MAX_EDIT_COURSES_PER_PROFILE )
|
|
||||||
{
|
{
|
||||||
RString s = ssprintf(
|
SCREENMAN->SetNewScreen( CREATE_NEW_SCREEN );
|
||||||
YOU_HAVE_MAXIMUM_EDITS_ALLOWED.GetValue() + "\n\n" + YOU_MUST_DELETE.GetValue(),
|
|
||||||
MAX_EDIT_COURSES_PER_PROFILE );
|
|
||||||
ScreenPrompt::Prompt( SM_None, s );
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( SONGMAN->GetNumEditCourses(ProfileSlot_Machine) >= MAX_EDIT_COURSES_PER_PROFILE )
|
||||||
|
{
|
||||||
|
RString s = ssprintf(
|
||||||
|
YOU_HAVE_MAXIMUM_EDITS_ALLOWED.GetValue() + "\n\n" + YOU_MUST_DELETE.GetValue(),
|
||||||
|
MAX_EDIT_COURSES_PER_PROFILE );
|
||||||
|
ScreenPrompt::Prompt( SM_None, s );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RString sDefaultName;
|
RString sDefaultName;
|
||||||
RString sThrowAway;
|
RString sThrowAway;
|
||||||
for( int i=1; i<=9999; i++ )
|
for( int i=1; i<=9999; i++ )
|
||||||
{
|
{
|
||||||
sDefaultName = ssprintf( "NewCourse%04d", i );
|
sDefaultName = ssprintf( "NewCourse%04d", i );
|
||||||
if( ValidateEditCourseName(sDefaultName,sThrowAway) )
|
if( ValidateEditCourseName(sDefaultName,sThrowAway) )
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
ScreenTextEntry::TextEntry( SM_BackFromEnterNameForNew,
|
||||||
|
ENTER_COURSE_NAME,
|
||||||
|
sDefaultName,
|
||||||
|
MAX_EDIT_COURSE_TITLE_LENGTH,
|
||||||
|
ValidateEditCourseName );
|
||||||
}
|
}
|
||||||
ScreenTextEntry::TextEntry( SM_BackFromEnterNameForNew,
|
|
||||||
ENTER_COURSE_NAME,
|
|
||||||
sDefaultName,
|
|
||||||
MAX_EDIT_COURSE_TITLE_LENGTH,
|
|
||||||
ValidateEditCourseName );
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else if( iCurRow == (int)m_pRows.size()-1 ) // "done"
|
else if( iCurRow == (int)m_pRows.size()-1 ) // "done"
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user