Added the LoopOnChartEnd metric for the editor.

Let the players decide whether to loop or not
when playing charts in the editor.
This commit is contained in:
Jason Felds
2011-05-27 12:43:14 -04:00
parent 40db083a53
commit a4ebdcc8cc
3 changed files with 12 additions and 2 deletions
+3 -2
View File
@@ -701,6 +701,8 @@ static Preference1D<RString> EDITOR_NOTE_SKINS( SetDefaultEditorNoteSkin, NUM_PL
static ThemeMetric<RString> EDIT_MODIFIERS ("ScreenEdit","EditModifiers");
static ThemeMetric<bool> LOOP_ON_CHART_END ("ScreenEdit","LoopOnChartEnd");
REGISTER_SCREEN_CLASS( ScreenEdit );
void ScreenEdit::Init()
@@ -1017,8 +1019,7 @@ void ScreenEdit::Update( float fDeltaTime )
float fStopAtSeconds = m_pSteps->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(m_iStopPlayingAt) ) + 1;
if( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fMusicSeconds > fStopAtSeconds )
{
// loop
TransitionEditState( STATE_PLAYING );
TransitionEditState( ( LOOP_ON_CHART_END ? STATE_PLAYING : STATE_EDITING ) );
}
}