Add prompt for clearing an area in Edit Mode. Updated changelog.

This commit is contained in:
Kyzentun
2015-03-08 00:56:29 -07:00
parent 976f773f7c
commit d3367d6a16
10 changed files with 86 additions and 5 deletions
+25
View File
@@ -4,6 +4,23 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________
2015/03/08
----------
* [EditMode] Clearing an area now prompts for confirmation if it contains
EditClearPromptThreshold notes or more. EditClearPromptThreshold is a
preference that can be set in the Advanced Options section, or in the
options in Edit Mode. [kyzentun]
2015/03/05
----------
* [Graphics] DX9 support improved, giving a large speed boost and fixing the
problem that made people get stuck with 16bit color. [xwidghet]
2015/03/04
----------
* [Loading] The song length from the cache is used now. This cut loading time
by 30% for kyz. [kyzentun]
2015/03/01
----------
* [SelectMusic] Select Music now plays music file named by #PREVIEW tag if
@@ -14,10 +31,18 @@ ________________________________________________________________________________
* [foreach] foreach_ordered lua function now works on tables that have both
number and string keys. Number keys are iterated over first. [kyzentun]
2015/02/28
----------
* [General] Pause/Break key now toggles "action" sounds off or on. There is
also a button in the F3 debug menu (press A, there are so many that it is
off the bottom) for people that don't have a Pause/Break key. [kyzentun]
2015/02/27
----------
* [ActorFrame] Fixed RemoveChild and RemoveAllChildren lua functions to
delete the children instead of leaking memory. [kyzentun]
* [Font] Asserts and other things that caused Stepmania to crash on font
mistakes now emit non-fatal errors. [kyzentun]
2015/02/26
----------
+8
View File
@@ -398,6 +398,7 @@ Edit Songs/Steps=Edit Songs/Steps
Practice Songs/Steps=Practice Songs/Steps
EditorShowBGChangesPlay=Choose whether to display song backgrounds while playing.
EditRecordModeLeadIn=Set the amount of lead-in time before recording starts.
EditClearPromptThreshold=Set the amount of notes that can be cleared without prompting.
Effect=Effect
EffectsReceptor=Add alternative behaviors to the receptors and notes.
EffectsArrow=Add alternative behaviors to the receptors and notes.
@@ -599,6 +600,7 @@ UserPrefScoringMode=Select the scoring mode to be used when not in a course.
80ms=80ms
90ms=90ms
100ms=100ms
-1=-1
0=0
0.25x=0.25x
0.3x=0.3x
@@ -663,6 +665,10 @@ x2.5=2.5x
8=8
8th=8th
9=9
50=50
100=100
1000=1000
1000000=1000000
Actual=Actual
Add=Additive
All Music=All Music
@@ -1034,6 +1040,7 @@ Edit fake=Edit fake segment
Editor options=Options
EditorShowBGChangesPlay=Show Backgrounds
EditRecordModeLeadIn=Record Lead In
EditClearPromptThreshold=Clear Prompt Amount
Erase step timing=Erase step timing
Effect=Effect
EffectsReceptor=Effects
@@ -1475,6 +1482,7 @@ Zoom In Camera=Zoom In Camera
'%s' is not a track id.='%s' is not a track id.
Adding New Attack=Enter the new modifier for this attack.\nThe length can be adjusted later.\nLeave it blank to cancel.
Adding New Mod=Please enter the new modifier for this attack.\n\nLeave it blank to cancel.
Are you sure you want to clear %d notes?=Are you sure you want to clear %d notes?
Edit Existing Mod=Please adjust the present modifier below.\n\nLeave it blank to erase the mod.
Edit Attack Start=Enter the time when this attack starts.
Edit Attack Length=Enter how long it takes for this attack to finish.
+4 -2
View File
@@ -3012,7 +3012,7 @@ Line20="conf,VisualDelaySeconds"
Fallback="ScreenOptionsServiceChild"
NextScreen="ScreenOptionsService"
PrevScreen="ScreenOptionsService"
LineNames="3,4,8,SI,SM,HN,11,13,14,15,16,28,29,30,31"
LineNames="3,4,8,SI,SM,HN,11,13,14,15,16,28,29,30,31,ECPT"
#LineScore="lua,UserPrefScoringMode()"
Line3="conf,TimingWindowScale"
Line4="conf,LifeDifficulty"
@@ -3029,6 +3029,7 @@ Line28="conf,AutogenSteps"
Line29="conf,AutogenGroupCourses"
Line30="conf,FastLoad"
Line31="conf,FastLoadAdditionalSongs"
LineECPT="conf,EditClearPromptThreshold"
# unused options
#Line2="conf,ScoringType"
@@ -4134,7 +4135,7 @@ PlayMusic=false
TimerSeconds=-1
ShowStyleIcon=false
LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,lead_in"
LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,lead_in,ECPT"
# uses legacy speed line
Line1="list,Speed"
Line2="list,Accel"
@@ -4156,6 +4157,7 @@ Line14="list,Rate"
Line15="list,AutoAdjust"
Line16="conf,EditorShowBGChangesPlay"
Linelead_in="conf,EditRecordModeLeadIn"
LineECPT="conf,EditClearPromptThreshold"
OutCancelCommand=
[StepsDisplayEdit]
+2 -2
View File
@@ -1322,7 +1322,7 @@ LineFlashyCombo="lua,ThemePrefRow('FlashyCombo')"
[ScreenOptionsGraphicsSound]
[ScreenOptionsAdvanced]
LineNames="3,4,8,SI,SM,11,13,14,16,28,29,30,RollCombo"
LineNames="3,4,8,SI,SM,11,13,14,16,28,29,30,RollCombo,ECPT"
LineRollCombo="lua,ThemePrefRow('ComboOnRolls')"
[ScreenAppearanceOptions]
@@ -2062,7 +2062,7 @@ TimerOnCommand=visible,false
[ScreenPractice]
[ScreenEditOptions]
LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,SF,lead_in"
LineNames="1,2,3,4,5,6,R1,R2,7,8,9,10,Attacks,11,12,13,14,15,16,SF,lead_in,ECPT"
Line1="lua,ArbitrarySpeedMods()"
LineSF="lua,OptionRowScreenFilter()"
+15
View File
@@ -500,6 +500,21 @@ int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const
return iNumNotes;
}
int NoteData::GetNumTapNotesNoTiming( int iStartIndex, int iEndIndex ) const
{
int iNumNotes = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
{
if(GetTapNote(t, r).type != TapNoteType_Empty)
{ iNumNotes++; }
}
}
return iNumNotes;
}
int NoteData::GetNumTapNotesInRow( int iRow ) const
{
int iNumNotes = 0;
+1
View File
@@ -297,6 +297,7 @@ public:
float GetFirstBeat() const { return NoteRowToBeat( GetFirstRow() ); }
float GetLastBeat() const { return NoteRowToBeat( GetLastRow() ); }
int GetNumTapNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumTapNotesNoTiming( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumTapNotesInRow( int iRow ) const;
int GetNumMines( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumRowsWithTap( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
+1
View File
@@ -259,6 +259,7 @@ PrefsManager::PrefsManager() :
m_fPadStickSeconds ( "PadStickSeconds", 0 ),
m_EditRecordModeLeadIn("EditRecordModeLeadIn", 1.0f),
m_EditClearPromptThreshold("EditClearPromptThreshold", 50),
m_bForceMipMaps ( "ForceMipMaps", false ),
m_bTrilinearFiltering ( "TrilinearFiltering", false ),
m_bAnisotropicFiltering ( "AnisotropicFiltering", false ),
+2
View File
@@ -255,6 +255,8 @@ public:
// Lead in time before recording starts in edit mode.
Preference<float> m_EditRecordModeLeadIn;
// User is prompted on clearing an area with more than this note count.
Preference<int> m_EditClearPromptThreshold;
// Useful for non 4:3 displays and resolutions < 640x480 where texels don't
// map directly to pixels.
+21 -1
View File
@@ -90,6 +90,7 @@ AutoScreenMessage( SM_BackFromKeysoundTrack );
AutoScreenMessage( SM_BackFromNewKeysound );
AutoScreenMessage( SM_DoRevertToLastSave );
AutoScreenMessage( SM_DoRevertFromDisk );
AutoScreenMessage( SM_ConfirmClearArea );
AutoScreenMessage( SM_BackFromTimingDataInformation );
AutoScreenMessage( SM_BackFromDifficultyMeterChange );
AutoScreenMessage( SM_BackFromBeat0Change );
@@ -4131,6 +4132,14 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
SetDirty( false );
}
}
else if(SM == SM_ConfirmClearArea)
{
if(ScreenPrompt::s_LastAnswer == ANSWER_YES)
{
m_NoteDataEdit.ClearRange(
m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker);
}
}
else if( SM == SM_DoEraseStepTiming )
{
if( ScreenPrompt::s_LastAnswer == ANSWER_YES )
@@ -4764,6 +4773,7 @@ static LocalizedString ENTER_ARBITRARY_MAPPING( "ScreenEdit", "Enter the new tra
static LocalizedString TOO_MANY_TRACKS("ScreenEdit", "Too many tracks specified.");
static LocalizedString NOT_A_TRACK("ScreenEdit", "'%s' is not a track id.");
static LocalizedString OUT_OF_RANGE_ID("ScreenEdit", "Entry %d, '%d', is out of range 1 to %d.");
static LocalizedString CONFIRM_CLEAR("ScreenEdit", "Are you sure you want to clear %d notes?");
static bool ConvertMappingInputToMapping(RString const& mapstr, int* mapping, RString& error)
{
@@ -4875,7 +4885,17 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
break;
case clear:
{
m_NoteDataEdit.ClearRange( m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker );
int note_count= m_NoteDataEdit.GetNumTapNotesNoTiming(
m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker);
if(note_count >= PREFSMAN->m_EditClearPromptThreshold)
{
ScreenPrompt::Prompt(SM_ConfirmClearArea, ssprintf(CONFIRM_CLEAR.GetValue(), note_count), PROMPT_YES_NO);
}
else
{
m_NoteDataEdit.ClearRange(
m_NoteFieldEdit.m_iBeginMarker, m_NoteFieldEdit.m_iEndMarker);
}
}
break;
case quantize:
+7
View File
@@ -690,6 +690,12 @@ static void EditRecordModeLeadIn(int &sel, bool to_sel, const ConfOption* conf_o
MoveMap(sel, conf_option, to_sel, mapping, ARRAYLEN(mapping));
}
static void EditClearPromptThreshold(int& sel, bool to_sel, const ConfOption* conf_option)
{
int mapping[]= {-1, 10, 50, 100, 1000, 1000000};
MoveMap(sel, conf_option, to_sel, mapping, ARRAYLEN(mapping));
}
static vector<ConfOption> g_ConfOptions;
static void InitializeConfOptions()
{
@@ -743,6 +749,7 @@ static void InitializeConfOptions()
}
ADD(c);
}
ADD(ConfOption("EditClearPromptThreshold", EditClearPromptThreshold, "-1", "10", "50", "100", "1000", "1000000"));
// Background options
ADD( ConfOption( "RandomBackgroundMode", MovePref<RandomBackgroundMode>, "Off","Animations","Random Movies" ) );