From ba55653468f1154698801a4499046da07a48b6e1 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 11 Feb 2011 01:51:01 -0500 Subject: [PATCH] Allow modifying the step's #CREDIT tag. --- Themes/_fallback/Languages/en.ini | 3 +++ src/ScreenEdit.cpp | 21 +++++++++++++++++++++ src/ScreenEdit.h | 1 + 3 files changed, 25 insertions(+) diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index e0c819f4f3..032631c80e 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -989,6 +989,7 @@ SoundResampleQuality=Resampling Quality SoundVolume=Sound Volume SoundVolumeAttract=Attract Volume Speed=Speed +Step Author=Step Author Steps=Steps Stream=Stream Style=Style @@ -1204,6 +1205,7 @@ Enter a new artist.=Enter a new artist. Enter a new genre.=Enter a new genre. Enter a new credit.=Enter a new credit. Enter a new description.=Enter a new description. +Enter the author who made this step pattern.=Enter the author who made this step pattern. Enter a new last beat hint.=Enter a new last beat hint. Enter a new main title transliteration.=Enter a new main title transliteration. Enter a new main title.=Enter a new main title. @@ -1608,6 +1610,7 @@ The folder "%s" appears to be a song folder. All song folders must reside in a You must supply a name for your new edit.=You must supply a name for your new edit. The name you chose conflicts with another edit. Please use a different name.=The name you chose conflicts with another edit. Please use a different name. The edit name cannot contain any of the following characters: %s=The edit name can not contain any of the following characters: %s +The step author's name cannot contain any of the following characters: %s=The step author's name cannot contain any of the following characters: %s [SongSort] FewestPlays=Fewest Plays diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index ca664c2762..5b196d8bcc 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -542,6 +542,7 @@ static MenuDef g_StepsInformation( // xxx: this giant list of numbers SUUUUUUUUUUCKS -aj MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" ), MenuRowDef( ScreenEdit::description, "Description", true, EditMode_Practice, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::step_credit, "Step Author", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::predict_meter, "Predicted Meter", false, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::tap_notes, "Tap Steps", false, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::jumps, "Jumps", false, EditMode_Full, true, true, 0, NULL ), @@ -2862,6 +2863,12 @@ static void ChangeDescription( const RString &sNew ) pSteps->SetDescription(sNew); } +static void ChangeStepCredit( const RString &sNew ) +{ + Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; + pSteps->SetCredit(sNew); +} + static void ChangeMainTitle( const RString &sNew ) { Song* pSong = GAMESTATE->m_pCurSong; @@ -3003,6 +3010,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns g_StepsInformation.rows[predict_meter].SetOneUnthemedChoice( ssprintf("%.2f",pSteps->PredictMeter()) ); g_StepsInformation.rows[description].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); g_StepsInformation.rows[description].SetOneUnthemedChoice( pSteps->GetDescription() ); + g_StepsInformation.rows[step_credit].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); + g_StepsInformation.rows[step_credit].SetOneUnthemedChoice( pSteps->GetCredit() ); g_StepsInformation.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) ); g_StepsInformation.rows[jumps].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumJumps()) ); g_StepsInformation.rows[hands].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHands()) ); @@ -3466,6 +3475,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns } static LocalizedString ENTER_NEW_DESCRIPTION( "ScreenEdit", "Enter a new description." ); +static LocalizedString ENTER_NEW_STEP_AUTHOR( "ScreenEdit", "Enter the author who made this step pattern." ); void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; @@ -3488,6 +3498,17 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v NULL ); break; + case step_credit: + ScreenTextEntry::TextEntry( + SM_None, + ENTER_NEW_STEP_AUTHOR, + m_pSteps->GetCredit(), + 255, + SongUtil::ValidateCurrentStepsCredit, + ChangeStepCredit, + NULL + ); + break; } } diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index dd34e3d4e7..4d7999b277 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -407,6 +407,7 @@ public: difficulty, meter, description, + step_credit, predict_meter, tap_notes, jumps,