Add the requested copy timing data functionality.

I don't know of a good way to copy timing data
across different styles, though.
This commit is contained in:
Jason Felds
2011-06-28 12:25:32 -04:00
parent 0033795252
commit a50069efa2
4 changed files with 39 additions and 0 deletions
+7
View File
@@ -8,6 +8,13 @@ ________________________________________________________________________________
StepMania 5.0 Preview 2 | 201106??
--------------------------------------------------------------------------------
2011/06/28
----------
* [ScreenEdit] Add a function to copy/paste the TimingData of a player's
choice. Remember to be in the appropriate mode when copying and pasting.
By default, the song timing is already located in the clipboard, ready for
use. [Wolfman2000]
2011/06/27
----------
* [Steps] Make sure #ATTACKS are copied when requested. [Wolfman2000]
+2
View File
@@ -821,6 +821,7 @@ Convert selection to delay=Convert selection to delay
Convert selection to warp=Convert selection to Warp Segment
Convert selection to fake=Convert selection to Fake Segment
Copy=Copy
Copy timing data=Copy timing data
CourseSortOrder=Course Sort
Create New=Create New
Create New Course=Create New
@@ -944,6 +945,7 @@ OsMountPlayer1=OS Mount Player1
OsMountPlayer2=OS Mount Player2
Paste at begin marker=Paste at begin marker
Paste at current beat=Paste at current beat
Paste timing data=Paste timing data
Persp=Persp
Play current beat to end=Play current beat to end
Play preview music=Play preview music
+22
View File
@@ -643,6 +643,8 @@ static MenuDef g_TimingDataInformation(
MenuRowDef( ScreenEdit::speed_mode, "Edit speed (mode)", true, EditMode_Full, true, true, 0, "Beats", "Seconds" ),
MenuRowDef( ScreenEdit::scroll, "Edit scrolling factor", true, EditMode_Full, true, true, 0, NULL ),
MenuRowDef( ScreenEdit::fake, "Edit fake", true, EditMode_Full, true, true, 0, NULL ),
MenuRowDef( ScreenEdit::copy_timing, "Copy timing data", true, EditMode_Full, true, true, 0, NULL ),
MenuRowDef( ScreenEdit::paste_timing, "Paste timing data", true, EditMode_Full, true, true, 0, NULL ),
MenuRowDef( ScreenEdit::erase_step_timing, "Erase step timing", true, EditMode_Full, true, true, 0, NULL )
);
@@ -873,6 +875,8 @@ void ScreenEdit::Init()
m_bRemoveNoteButtonDown = false;
m_Clipboard.SetNumTracks( m_NoteDataEdit.GetNumTracks() );
clipboardTiming = GAMESTATE->m_pCurSong->m_SongTiming; // always have a backup.
m_bHasUndo = false;
m_Undo.SetNumTracks( m_NoteDataEdit.GetNumTracks() );
@@ -4404,6 +4408,24 @@ void ScreenEdit::HandleTimingDataInformationChoice( TimingDataInformationChoice
);
break;
}
case copy_timing:
{
clipboardTiming = GetAppropriateTiming();
break;
}
case paste_timing:
{
if (GAMESTATE->m_bIsUsingStepTiming)
{
GAMESTATE->m_pCurSteps[PLAYER_1]->m_Timing = clipboardTiming;
}
else
{
GAMESTATE->m_pCurSong->m_SongTiming = clipboardTiming;
}
SetDirty(true);
break;
}
case erase_step_timing:
ScreenPrompt::Prompt( SM_DoEraseStepTiming, CONFIRM_TIMING_ERASE , PROMPT_YES_NO, ANSWER_NO );
break;
+8
View File
@@ -273,6 +273,12 @@ protected:
* This is mainly to allow playing a chart with Song Timing. */
TimingData backupStepTiming;
/**
* @brief Have a backup of the TimingData of the player's choice.
*
* This will be used for copying and pasting as required. */
TimingData clipboardTiming;
/** @brief The current TapNote that would be inserted. */
TapNote m_selectedTap;
@@ -550,6 +556,8 @@ public:
speed_mode,
scroll,
fake,
copy_timing,
paste_timing,
erase_step_timing,
NUM_TIMING_DATA_INFORMATION_CHOICES
};