say in sync message whether notes are earlier or later

This commit is contained in:
Chris Danford
2005-06-02 21:48:06 +00:00
parent de113c2d81
commit d95fb8cc83
2 changed files with 26 additions and 21 deletions
+8 -6
View File
@@ -17,10 +17,11 @@ static CString GetPromptText()
if( fabs(fDelta) > 0.00001 ) if( fabs(fDelta) > 0.00001 )
{ {
s += ssprintf( s += ssprintf(
"You have changed the Machine Global Offset\nfrom %.3f to %.3f (%+.3f).\n\n", "You have changed the Global Offset\nfrom %+.3f to %+.3f (change of %+.3f, notes %s).\n\n",
fOld, fOld,
fNew, fNew,
fDelta ); fDelta,
fDelta > 0 ? "earlier":"later" );
} }
} }
@@ -37,10 +38,11 @@ static CString GetPromptText()
if( fabs(fDelta) > 0.00001 ) if( fabs(fDelta) > 0.00001 )
{ {
s += ssprintf( s += ssprintf(
"The song offset changed from %.3f to %.3f (%+.3f).\n\n", "The song offset changed from %+.3f to %+.3f (change of %+.3f, notes %s).\n\n",
fOld, fOld,
fNew, fNew,
fDelta ); fDelta,
fDelta > 0 ? "earlier":"later" );
} }
} }
@@ -53,7 +55,7 @@ static CString GetPromptText()
if( fabs(fDelta) > 0.00001 ) if( fabs(fDelta) > 0.00001 )
{ {
s += ssprintf( s += ssprintf(
"The %s BPM segment changed from %.3f BPS to %.3f BPS (%+.3f).\n\n", "The %s BPM segment changed from %+.3f BPS to %+.3f BPS (change of %+.3f).\n\n",
FormatNumberAndSuffix(i+1).c_str(), FormatNumberAndSuffix(i+1).c_str(),
fOld, fOld,
fNew, fNew,
@@ -70,7 +72,7 @@ static CString GetPromptText()
if( fabs(fDelta) > 0.00001 ) if( fabs(fDelta) > 0.00001 )
{ {
s += ssprintf( s += ssprintf(
"The %s Stop segment changed from %.3f seconds to %.3f seconds (%+.3f).\n\n", "The %s Stop segment changed from %+.3f seconds to %+.3f seconds (change of %+.3f).\n\n",
FormatNumberAndSuffix(i+1).c_str(), FormatNumberAndSuffix(i+1).c_str(),
fOld, fOld,
fNew, fNew,
+18 -15
View File
@@ -37,12 +37,13 @@ void ScreenSyncOverlay::Init()
m_textHelp.SetText( m_textHelp.SetText(
"Revert sync changes:\n" "Revert sync changes:\n"
" F4\n" " F4\n"
"Adjust current BPM:\n" "Current BPM - smaller/larger:\n"
" F9/F10 (hold Alt for smaller)\n" " F9/F10\n"
"Adjust song offset:\n" "Song offset - notes earlier/later:\n"
" F11/F12 (hold Alt for smaller)\n" " F11/F12\n"
"Adjust machine offset:\n" "Machine offset - notes earlier/later:\n"
" Shift + F11/F12 (hold Alt for smaller)" ); " Shift + F11/F12\n"
"(hold Alt for smaller increment)" );
this->AddChild( &m_textHelp ); this->AddChild( &m_textHelp );
m_quad.ZoomToWidth( m_textHelp.GetZoomedWidth()+20 ); m_quad.ZoomToWidth( m_textHelp.GetZoomedWidth()+20 );
@@ -108,9 +109,10 @@ void ScreenSyncOverlay::UpdateText()
if( fabsf(fDelta) > 0.00001f ) if( fabsf(fDelta) > 0.00001f )
{ {
s += ssprintf( s += ssprintf(
"Machine global offset: %.3fs (%+.3f)\n", "Global Offset from %+.3f to %+.3f (notes %s).\n",
fOld,
fNew, fNew,
fDelta ); fDelta > 0 ? "earlier":"later" );
} }
} }
@@ -122,9 +124,10 @@ void ScreenSyncOverlay::UpdateText()
if( fabsf(fDelta) > 0.00001f ) if( fabsf(fDelta) > 0.00001f )
{ {
s += ssprintf( s += ssprintf(
"Song offset: %.3fs (%+.3f)\n", "Song offset from %+.3f to %+.3f (notes %s).\n",
fOld,
fNew, fNew,
fDelta ); fDelta > 0 ? "earlier":"later" );
} }
} }
@@ -139,10 +142,10 @@ void ScreenSyncOverlay::UpdateText()
if( fabsf(fDelta) > 0.00001f ) if( fabsf(fDelta) > 0.00001f )
{ {
s += ssprintf( s += ssprintf(
"%s tempo segment: %.3f BPS (%+.3f)\n", "%s tempo segment from %+.3f BPS to %+.3f BPS.\n",
FormatNumberAndSuffix(i+1).c_str(), FormatNumberAndSuffix(i+1).c_str(),
fNew, fOld,
fDelta ); fNew );
} }
} }
@@ -213,8 +216,8 @@ bool ScreenSyncOverlay::OverlayInput( const DeviceInput& DeviceI, const InputEve
float fDelta; float fDelta;
switch( DeviceI.button ) switch( DeviceI.button )
{ {
case KEY_F11: fDelta = -0.02f; break; case KEY_F11: fDelta = +0.02f; break; // notes earlier
case KEY_F12: fDelta = +0.02f; break; case KEY_F12: fDelta = -0.02f; break; // notes earlier
default: ASSERT(0); default: ASSERT(0);
} }
if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RALT)) || if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RALT)) ||