Edits can have 255 chars in the description now.

This commit is contained in:
Jason Felds
2011-06-11 15:10:27 -04:00
parent cd3bb6f0ed
commit f900b53f1d
7 changed files with 11 additions and 9 deletions
+2
View File
@@ -14,6 +14,8 @@ StepMania 5.0 Preview 2 | 20110???
your area, enter the menu, and choose "Designate as Music Preview". No more
math calculations needed! [Wolfman2000]
* [SongUtil] Added GetPlayableSteps(Song) Lua binding. [AJ]
* [Steps] Allow 255 characters for all chart descriptions, including edits.
We are no longer bound by In The Groove I think. [Wolfman2000]
2011/06/10
----------
+1 -1
View File
@@ -3880,7 +3880,7 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v
SM_None,
ENTER_NEW_DESCRIPTION,
m_pSteps->GetDescription(),
(dc == Difficulty_Edit) ? MAX_EDIT_STEPS_DESCRIPTION_LENGTH : 255,
MAX_STEPS_DESCRIPTION_LENGTH,
SongUtil::ValidateCurrentStepsDescription,
ChangeDescription,
NULL
+1 -1
View File
@@ -297,7 +297,7 @@ void ScreenEditMenu::MenuStart( const InputEventPlus &input )
SM_BackFromEditDescription,
ENTER_EDIT_DESCRIPTION,
GAMESTATE->m_pCurSteps[0]->GetDescription(),
MAX_EDIT_STEPS_DESCRIPTION_LENGTH,
MAX_STEPS_DESCRIPTION_LENGTH,
SongUtil::ValidateCurrentStepsDescription,
SetCurrentStepsDescription,
DeleteCurrentSteps );
+1 -1
View File
@@ -203,7 +203,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
SM_BackFromRename,
ENTER_NAME_FOR_STEPS,
GAMESTATE->m_pCurSteps[PLAYER_1]->GetDescription(),
MAX_EDIT_STEPS_DESCRIPTION_LENGTH,
MAX_STEPS_DESCRIPTION_LENGTH,
SongUtil::ValidateCurrentEditStepsDescription );
}
break;
+1 -1
View File
@@ -760,7 +760,7 @@ RString SongUtil::MakeUniqueEditDescription( const Song *pSong, StepsType st, co
{
// make name "My Edit" -> "My Edit2"
RString sNum = ssprintf("%d", i+1);
sTemp = sPreferredDescription.Left( MAX_EDIT_STEPS_DESCRIPTION_LENGTH - sNum.size() ) + sNum;
sTemp = sPreferredDescription.Left( MAX_STEPS_DESCRIPTION_LENGTH - sNum.size() ) + sNum;
if( IsEditDescriptionUnique(pSong, st, sTemp, NULL) )
return sTemp;
+2 -2
View File
@@ -402,9 +402,9 @@ void Steps::SetChartStyle( RString sChartStyle )
bool Steps::MakeValidEditDescription( RString &sPreferredDescription )
{
if( int(sPreferredDescription.size()) > MAX_EDIT_STEPS_DESCRIPTION_LENGTH )
if( int(sPreferredDescription.size()) > MAX_STEPS_DESCRIPTION_LENGTH )
{
sPreferredDescription = sPreferredDescription.Left( MAX_EDIT_STEPS_DESCRIPTION_LENGTH );
sPreferredDescription = sPreferredDescription.Left( MAX_STEPS_DESCRIPTION_LENGTH );
return true;
}
return false;
+3 -3
View File
@@ -15,11 +15,11 @@ class NoteData;
struct lua_State;
/**
* @brief Allow only 12 characters for the length of edits.
* @brief Enforce a limit on the number of chars for the description.
*
* This is a holdover from In The Groove: this may perhaps be not needed in the future.
* In In The Groove, this limit was 12: we do not need such a limit now.
*/
const int MAX_EDIT_STEPS_DESCRIPTION_LENGTH = 12;
const int MAX_STEPS_DESCRIPTION_LENGTH = 255;
/**
* @brief Holds note information for a Song.