working on course edit screen

This commit is contained in:
Chris Danford
2003-08-11 00:25:05 +00:00
parent d049234f03
commit ce6ab9f929
2 changed files with 63 additions and 14 deletions
+8 -8
View File
@@ -41,8 +41,8 @@ LogoOnCommand=x,320;y,240;zoomy,0;sleep,0.5;bounceend,0.5;zoomy,1;glowshift;effe
VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2 VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2 SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
ChoicesX=320 ChoicesX=320
ChoicesStartY=92 ChoicesStartY=86
ChoicesSpacingY=52 ChoicesSpacingY=48
ChoicesShadowLength=5 ChoicesShadowLength=5
HelpX=320 HelpX=320
HelpY=440 HelpY=440
@@ -1607,7 +1607,7 @@ HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to con
ExplanationX=320 ExplanationX=320
ExplanationY=410 ExplanationY=410
ExplanationText=In this mode, you can edit courses. ExplanationText=In this mode, you can edit courses.
HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to continue HelpText=&UP; &DOWN; change line &LEFT; &RIGHT; change value START to open sub-menu
[ScreenSystemLayer] [ScreenSystemLayer]
StatsX=632 StatsX=632
@@ -2252,19 +2252,19 @@ EntryBannerHeight=40
EntryTextBannerX=320 EntryTextBannerX=320
EntryTextBannerY=130 EntryTextBannerY=130
CourseBannerX=490 CourseBannerX=490
CourseBannerY=80 CourseBannerY=90
CourseBannerWidth=130 CourseBannerWidth=130
CourseBannerHeight=40 CourseBannerHeight=40
RowLabelsX=20 RowLabelsX=20
RowValue1X=320 RowValue1X=320
RowValue2X=380 RowValue2X=380
RowValue3X=380 RowValue3X=380
RowValue4X=320 RowValue4X=380
RowValue5X=380 RowValue5X=380
RowValue6X=320 RowValue6X=380
RowValue7X=380 RowValue7X=380
Row1Y=80 Row1Y=90
Row2Y=130 Row2Y=140
Row3Y=180 Row3Y=180
Row4Y=220 Row4Y=220
Row5Y=260 Row5Y=260
+55 -6
View File
@@ -144,6 +144,7 @@ void EditCoursesMenu::Up()
{ {
if( CanGoUp() ) if( CanGoUp() )
{ {
ChangeToRow( Row(m_SelectedRow-1) );
m_soundChangeRow.PlayRandom(); m_soundChangeRow.PlayRandom();
} }
} }
@@ -152,6 +153,7 @@ void EditCoursesMenu::Down()
{ {
if( CanGoDown() ) if( CanGoDown() )
{ {
ChangeToRow( Row(m_SelectedRow+1) );
m_soundChangeRow.PlayRandom(); m_soundChangeRow.PlayRandom();
} }
} }
@@ -204,17 +206,18 @@ void EditCoursesMenu::OnRowValueChanged( Row row )
switch( row ) switch( row )
{ {
case ROW_COURSE: case ROW_COURSE:
m_textValue[ROW_COURSE].SetText( GetSelectedCourse()->m_sName ); m_textValue[ROW_COURSE].SetText( pCourse->m_sName );
m_CourseBanner.LoadFromGroup( GetSelectedCourse()->m_sBannerPath ); m_CourseBanner.LoadFromCourse( pCourse );
m_CourseBanner.ScaleToClipped( COURSE_BANNER_WIDTH, COURSE_BANNER_HEIGHT ); m_CourseBanner.ScaleToClipped( COURSE_BANNER_WIDTH, COURSE_BANNER_HEIGHT );
m_iSelection[ROW_ENTRY] = 0; m_iSelection[ROW_ENTRY] = 0;
// fall through // fall through
case ROW_SAVE: case ROW_SAVE:
m_textValue[ROW_SAVE].SetText( "(press START)" );
// fall through // fall through
case ROW_COURSE_OPTIONS: case ROW_COURSE_OPTIONS:
m_textValue[ROW_COURSE_OPTIONS].SetText( m_textValue[ROW_COURSE_OPTIONS].SetText(
ssprintf( ssprintf(
"%s, %s, %d", "%s, %s, %d lives",
pCourse->m_bRepeat ? "repeat" : "no repeat", pCourse->m_bRepeat ? "repeat" : "no repeat",
pCourse->m_bRandomize ? "randomize" : "no randomize", pCourse->m_bRandomize ? "randomize" : "no randomize",
pCourse->m_iLives ) ); pCourse->m_iLives ) );
@@ -223,13 +226,59 @@ void EditCoursesMenu::OnRowValueChanged( Row row )
m_textValue[ROW_ENTRY].SetText( ssprintf("%d",m_iSelection[ROW_ENTRY]+1) ); m_textValue[ROW_ENTRY].SetText( ssprintf("%d",m_iSelection[ROW_ENTRY]+1) );
// fall through // fall through
case ROW_ENTRY_TYPE: case ROW_ENTRY_TYPE:
m_textValue[ROW_ENTRY_TYPE].SetText( pEntry ? CourseEntryTypeToString(pEntry->type) : "none" ); m_textValue[ROW_ENTRY_TYPE].SetText( pEntry ? CourseEntryTypeToString(pEntry->type) : "(none)" );
// fall through // fall through
case ROW_ENTRY_OPTIONS: case ROW_ENTRY_OPTIONS:
m_textValue[ROW_ENTRY_OPTIONS].SetText( "coming soon" ); {
CString s;
if( pEntry )
{
switch( pEntry->type )
{
case COURSE_ENTRY_FIXED:
s = pEntry->pSong ? "missing song" : pEntry->pSong->GetFullTranslitTitle();
break;
case COURSE_ENTRY_RANDOM:
s = "any group";
break;
case COURSE_ENTRY_RANDOM_WITHIN_GROUP:
s = "group: " + pEntry->group_name;
break;
case COURSE_ENTRY_BEST:
s = ssprintf( "best - %d", pEntry->players_index+1 );
break;
case COURSE_ENTRY_WORST:
s = ssprintf( "worst - %d", pEntry->players_index+1 );
break;
default:
ASSERT(0);
break;
}
}
else
{
s = "n/a";
}
m_textValue[ROW_ENTRY_OPTIONS].SetText( s );
}
// fall through // fall through
case ROW_ENTRY_MODIFIERS: case ROW_ENTRY_MODIFIERS:
m_textValue[ROW_ENTRY_OPTIONS].SetText( "coming soon" ); {
CString s;
if( pEntry )
{
s = pEntry->modifiers;
if( s.empty() )
s = "(none)";
}
else
{
s = "n/a";
}
m_textValue[ROW_ENTRY_MODIFIERS].SetText( s );
}
break; break;
default: default:
ASSERT(0); // invalid row ASSERT(0); // invalid row