diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 0ff4b95235..2c547ac03d 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -562,23 +562,19 @@ static MenuDef g_SongInformation( MenuRowDef( ScreenEdit::max_bpm, "Max BPM", true, EditMode_Full, true, true, 0, NULL ) ); -static const MenuRowDef g_TimingDataLines[] = -{ - MenuRowDef( ScreenEdit::beat_0_offset, "Beat 0 Offset", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::bpm, "Edit BPM change", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::stop, "Edit stop", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::delay, "Edit delay", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::time_signature_numerator, "Edit time signature (top)", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::time_signature_denominator, "Edit time signature (bottom)", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::tickcount, "Edit tickcount", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::combo, "Edit combo", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::label, "Edit label", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::warp, "Edit warp", true, EditMode_Full, true, true, 0, NULL ), -}; static MenuDef g_TimingDataInformation( - "ScreenMiniMenuTimingDataInformation" - // fill this in dynamically too. + "ScreenMiniMenuTimingDataInformation", + MenuRowDef( ScreenEdit::beat_0_offset, "Beat 0 Offset", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::bpm, "Edit BPM change", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::stop, "Edit stop", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::delay, "Edit delay", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::time_signature_numerator, "Edit time signature (top)", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::time_signature_denominator, "Edit time signature (bottom)", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::label, "Edit label", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::tickcount, "Edit tickcount", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::combo, "Edit combo", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::warp, "Edit warp", true, EditMode_Full, true, true, 0, NULL ) ); enum { song_bganimation, song_movie, song_bitmap, global_bganimation, global_movie, global_movie_song_group, global_movie_song_group_and_genre, dynamic_random, baked_random, none }; @@ -3159,43 +3155,23 @@ inline float ScreenEdit::GetBeat() void ScreenEdit::DisplayTimingMenu() { - g_TimingDataInformation.rows.clear(); - - for( unsigned i=0; im_bIsEditorStepTiming ) - { - continue; - } - - g_TimingDataInformation.rows.push_back(hl); - } - float fBeat = GetBeat(); TimingData &pTime = GetAppropriateTiming(); - - // TODO: Better way of guaranteeing that we don't go out of bounds between timings. - int posLabel = ScreenEdit::tickcount; - g_TimingDataInformation.rows[beat_0_offset].SetOneUnthemedChoice( ssprintf("%.5f", pTime.m_fBeat0OffsetInSeconds) ); g_TimingDataInformation.rows[bpm].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetBPMAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[stop].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetStopAtBeat( fBeat ) ) ) ; g_TimingDataInformation.rows[delay].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetDelayAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[time_signature_numerator].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTimeSignatureNumeratorAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[time_signature_denominator].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTimeSignatureDenominatorAtBeat( fBeat ) ) ); + g_TimingDataInformation.rows[label].SetOneUnthemedChoice( pTime.GetLabelAtBeat( fBeat ).c_str() ); + g_TimingDataInformation.rows[tickcount].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTickcountAtBeat( fBeat ) ) ); + g_TimingDataInformation.rows[combo].SetOneUnthemedChoice( ssprintf("%d", pTime.GetComboAtBeat( fBeat ) ) ); + g_TimingDataInformation.rows[warp].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetWarpAtBeat( fBeat ) ) ); - if( GAMESTATE->m_bIsEditorStepTiming ) - { - g_TimingDataInformation.rows[tickcount].SetOneUnthemedChoice( ssprintf("%d", pTime.GetTickcountAtBeat( fBeat ) ) ); - g_TimingDataInformation.rows[combo].SetOneUnthemedChoice( ssprintf("%d", pTime.GetComboAtBeat( fBeat ) ) ); - g_TimingDataInformation.rows[warp].SetOneUnthemedChoice( ssprintf("%.5f", pTime.GetWarpAtBeat( fBeat ) ) ); - posLabel = ScreenEdit::label; - } - g_TimingDataInformation.rows[posLabel].SetOneUnthemedChoice( pTime.GetLabelAtBeat( fBeat ).c_str() ); - + g_TimingDataInformation.rows[tickcount].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + g_TimingDataInformation.rows[combo].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + g_TimingDataInformation.rows[warp].bEnabled = GAMESTATE->m_bIsEditorStepTiming; + EditMiniMenu( &g_TimingDataInformation, SM_BackFromTimingDataInformation ); } diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index f783cf5368..68a2353a83 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -492,9 +492,9 @@ public: // time_signature, time_signature_numerator, time_signature_denominator, + label, tickcount, combo, - label, warp, NUM_TIMING_DATA_INFORMATION_CHOICES };