add "jump to next note", "jump to previous note"

This commit is contained in:
Glenn Maynard
2005-07-22 00:55:36 +00:00
parent b8838ba5c0
commit b2c7e5e829
4 changed files with 86 additions and 0 deletions
+16
View File
@@ -122,6 +122,8 @@ void ScreenEdit::InitEditMappings()
m_EditMappings.button[EDIT_BUTTON_SCROLL_DOWN_PAGE][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PGDN);
m_EditMappings.button[EDIT_BUTTON_SCROLL_HOME][0] = DeviceInput(DEVICE_KEYBOARD, KEY_HOME);
m_EditMappings.button[EDIT_BUTTON_SCROLL_END][0] = DeviceInput(DEVICE_KEYBOARD, KEY_END);
m_EditMappings.button[EDIT_BUTTON_SCROLL_NEXT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PERIOD);
m_EditMappings.button[EDIT_BUTTON_SCROLL_PREV][0] = DeviceInput(DEVICE_KEYBOARD, KEY_COMMA);
m_EditMappings.button [EDIT_BUTTON_SCROLL_SPEED_UP][0] = DeviceInput(DEVICE_KEYBOARD, KEY_UP);
m_EditMappings.hold[EDIT_BUTTON_SCROLL_SPEED_UP][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL);
@@ -1154,6 +1156,20 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
ScrollTo( fDestinationBeat );
}
break;
case EDIT_BUTTON_SCROLL_NEXT:
{
int iRow = BeatToNoteRow( GAMESTATE->m_fSongBeat );
NoteDataUtil::GetNextEditorPosition( m_NoteDataEdit, iRow );
ScrollTo( NoteRowToBeat(iRow) );
}
break;
case EDIT_BUTTON_SCROLL_PREV:
{
int iRow = BeatToNoteRow( GAMESTATE->m_fSongBeat );
NoteDataUtil::GetPrevEditorPosition( m_NoteDataEdit, iRow );
ScrollTo( NoteRowToBeat(iRow) );
}
break;
case EDIT_BUTTON_SNAP_NEXT:
if( m_SnapDisplay.PrevSnapMode() )
OnSnapModeChange();