More editor work. Pressing \ cycles through steps/difficulties and updates the meter value for the particular difficulty.

This commit is contained in:
Steve Checkoway
2006-03-05 03:52:00 +00:00
parent 373d226dd7
commit 778025184c
4 changed files with 29 additions and 7 deletions
+25 -2
View File
@@ -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<OptionRowHandler*> 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<PlayerNumber> 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
+2 -1
View File
@@ -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
+1 -3
View File
@@ -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 );
+1 -1
View File
@@ -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