diff --git a/stepmania/src/ScreenOptionsEditCourse.cpp b/stepmania/src/ScreenOptionsEditCourse.cpp index 79a74e4ca9..8d8565672f 100644 --- a/stepmania/src/ScreenOptionsEditCourse.cpp +++ b/stepmania/src/ScreenOptionsEditCourse.cpp @@ -46,6 +46,7 @@ REGISTER_SCREEN_CLASS( ScreenOptionsEditCourse ); void ScreenOptionsEditCourse::Init() { ScreenOptionsEditCourseSubMenu::Init(); + SubscribeToMessage( Message_EditCourseDifficultyChanged ); } static LocalizedString ENTRY( "OptionTitles", "Entry %d" ); @@ -58,7 +59,6 @@ void ScreenOptionsEditCourse::BeginScreen() m_Original = *pCourse; SONGMAN->GetSongs( m_vpDisplayedSongs ); - vector vHands; OptionRowHandler *pHand = OptionRowHandlerUtil::MakeNull(); @@ -335,6 +335,29 @@ void ScreenOptionsEditCourse::ProcessMenuStart( const InputEventPlus &input ) } +void ScreenOptionsEditCourse::HandleMessage( const RString& sMessage ) +{ + if( sMessage == "EditCourseDifficultyChanged" ) + { +#if 1 + const int iMeter = GAMESTATE->m_pCurCourse->m_iCustomMeter[GAMESTATE->m_cdEdit]; + int iSel; + + if( iMeter == -1 ) + iSel = 0; + else + iSel = iMeter + 1 - MIN_METER; + ChangeValueInRowAbsolute( EditCourseRow_Meter, GAMESTATE->m_MasterPlayerNumber, iSel, false ); +#else + const vector vpns( 1, GAMESTATE->m_MasterPlayerNumber ); + + ImportOptions( EditCourseRow_Meter, vpns ); + AfterChangeValueOrRow( GAMESTATE->m_MasterPlayerNumber ); +#endif + } + ScreenOptionsEditCourseSubMenu::HandleMessage( sMessage ); +} + int ScreenOptionsEditCourse::GetCourseEntryIndexWithFocus() const { int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber]; @@ -347,7 +370,7 @@ int ScreenOptionsEditCourse::GetCourseEntryIndexWithFocus() const } /* - * (c) 2002-2004 Chris Danford + * (c) 2002-2006 Chris Danford, Steve Checkoway * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/stepmania/src/ScreenOptionsEditCourse.h b/stepmania/src/ScreenOptionsEditCourse.h index a35e595462..51c2a03697 100644 --- a/stepmania/src/ScreenOptionsEditCourse.h +++ b/stepmania/src/ScreenOptionsEditCourse.h @@ -19,6 +19,7 @@ protected: virtual void AfterChangeRow( PlayerNumber pn ); virtual void AfterChangeValueInRow( int iRow, PlayerNumber pn ); virtual void ProcessMenuStart( const InputEventPlus &input ); + virtual void HandleMessage( const RString& sMessage ); int GetCourseEntryIndexWithFocus() const; @@ -30,7 +31,7 @@ protected: #endif /* - * (c) 2003-2004 Chris Danford + * (c) 2003-2006 Chris Danford, Steve Checkoway * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/stepmania/src/ScreenOptionsManageCourses.cpp b/stepmania/src/ScreenOptionsManageCourses.cpp index 52ab6c0f5c..d9ba0b9686 100644 --- a/stepmania/src/ScreenOptionsManageCourses.cpp +++ b/stepmania/src/ScreenOptionsManageCourses.cpp @@ -78,10 +78,8 @@ void ScreenOptionsEditCourseSubMenu::MenuSelect( const InputEventPlus &input ) { SetNextCombination(); m_soundDifficultyChanged.Play(); - return; } - ScreenOptions::MenuSelect( input ); } static LocalizedString FAILED_TO_WRITE_COURSE( "ScreenOptionsEditCourseSubMenu", "Failed to write course." ); @@ -361,7 +359,7 @@ void ScreenOptionsManageCourses::HandleScreenMessage( const ScreenMessage SM ) case CourseAction_Edit: { Course *pCourse = GetCourseWithFocus(); - Trail *pTrail = pCourse->GetTrail( GAMESTATE->m_stEdit ); + Trail *pTrail = pCourse->GetTrail( GAMESTATE->m_stEdit, GAMESTATE->m_cdEdit ); GAMESTATE->m_pCurCourse.Set( pCourse ); GAMESTATE->m_pCurTrail[PLAYER_1].Set( pTrail ); diff --git a/stepmania/src/ScreenOptionsManageCourses.h b/stepmania/src/ScreenOptionsManageCourses.h index 906c8fcfac..6ec247922a 100644 --- a/stepmania/src/ScreenOptionsManageCourses.h +++ b/stepmania/src/ScreenOptionsManageCourses.h @@ -44,7 +44,7 @@ protected: #endif /* - * (c) 2003-2004 Chris Danford + * (c) 2003-2006 Chris Danford, Steve Checkoway * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a