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:
+3
-2
@@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user