From 5d26c474d9ffa9c1361e10107a3777fbea98e3e4 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 27 Nov 2011 18:33:34 -0500 Subject: [PATCH] Well, that was a doozy. Allow inserting and removing of beats and timing changes in increments other than 4th notes. --- Docs/Changelog_sm5.txt | 5 +++++ src/ScreenEdit.cpp | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 5fe89fecb7..5d3429b050 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -14,6 +14,11 @@ StepMania 5.0 $next | 20111xxx Fixed the logic for GetReversePercentForColumn; It will now return nil for invalid columns. Also fixed the logic for UsingReverse (now checks for 1.0f) and SetPassmark (no longer allows values < 0.00f and > 1.0f). [AJ] +* [ScreenEdit] Allow inserting and removing beats and timing changes in + specific note increments instead of just quarter notes (a whole beat). + Those that prefer to keep using the shortcut keys will note that the + behavior has not changed for that: only by going into the Area menu can you + deal with more specific changes. [Wolfman2000] 2011/11/26 ---------- diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index d369459a8b..8e3ef341db 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -594,10 +594,10 @@ static MenuDef g_AreaMenu( MenuRowDef( ScreenEdit::paste_at_current_beat, "Paste at current beat", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::paste_at_begin_marker, "Paste at begin marker", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::paste_partial_timing_at_beat, "Paste Partial Timing at current beat", true, EditMode_Practice, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::insert_and_shift, "Insert beat and shift down", true, EditMode_Practice, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::delete_and_shift, "Delete beat and shift up", true, EditMode_Practice, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::shift_pauses_forward, "Shift all timing changes down", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::shift_pauses_backward, "Shift all timing changes up", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::insert_and_shift, "Insert beat and shift down", true, EditMode_Practice, true, true, 0, "4th","8th","12th","16th","24th","32nd","48th","64th","192nd" ), + MenuRowDef( ScreenEdit::delete_and_shift, "Delete beat and shift up", true, EditMode_Practice, true, true, 0, "4th","8th","12th","16th","24th","32nd","48th","64th","192nd" ), + MenuRowDef( ScreenEdit::shift_pauses_forward, "Shift all timing changes down", true, EditMode_Full, true, true, 0, "4th","8th","12th","16th","24th","32nd","48th","64th","192nd" ), + MenuRowDef( ScreenEdit::shift_pauses_backward, "Shift all timing changes up", true, EditMode_Full, true, true, 0, "4th","8th","12th","16th","24th","32nd","48th","64th","192nd" ), MenuRowDef(ScreenEdit::convert_pause_to_beat, "Convert pause to beats", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::convert_delay_to_beat, "Convert delay to beats", true, @@ -4396,17 +4396,26 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns #endif break; } + case insert_and_shift: - NoteDataUtil::InsertRows( m_NoteDataEdit, GetRow() ), BeatToNoteRow(1) ); + NoteDataUtil::InsertRows( m_NoteDataEdit, GetRow(), + iAnswers.size() > 0 ? + NoteTypeToRow((NoteType)iAnswers[c]) : 48); break; case delete_and_shift: - NoteDataUtil::DeleteRows( m_NoteDataEdit, GetRow() ), BeatToNoteRow(1) ); + NoteDataUtil::DeleteRows( m_NoteDataEdit, GetRow(), + iAnswers.size() > 0 ? + NoteTypeToRow((NoteType)iAnswers[c]) : 48); break; case shift_pauses_forward: - GetAppropriateTiming().InsertRows( GetRow() ), BeatToNoteRow(1) ); + GetAppropriateTiming().InsertRows( GetRow(), + iAnswers.size() > 0 ? + NoteTypeToRow((NoteType)iAnswers[c]) : 48); break; case shift_pauses_backward: - GetAppropriateTiming().DeleteRows( GetRow() + 1, BeatToNoteRow(1) ); + GetAppropriateTiming().DeleteRows( GetRow() + 1, + iAnswers.size() > 0 ? + NoteTypeToRow((NoteType)iAnswers[c]) : 48); break; case convert_pause_to_beat: