[ScreenSelectMusic] add a code for closing the current folder from any location (a la DDR X2)

[metric will be added with the next batch of theme commits]
This commit is contained in:
AJ Kelly
2010-07-06 17:07:38 -05:00
parent 398c7bb7cb
commit e42417df83
4 changed files with 25 additions and 0 deletions
+6
View File
@@ -51,6 +51,7 @@ const char *CodeNames[] = {
"SaveScreenshot2",
"CancelAllPlayerOptions",
"BackInEventMode",
"CloseCurrentFolder",
};
XToString( Code );
@@ -76,6 +77,11 @@ void CodeDetector::RefreshCacheItems( RString sClass )
}
}
bool CodeDetector::EnteredCloseFolder( GameController controller )
{
return EnteredCode(controller,CODE_CLOSE_CURRENT_FOLDER);
}
bool CodeDetector::EnteredNextGroup( GameController controller )
{
return EnteredCode(controller,CODE_NEXT_GROUP);
+2
View File
@@ -45,6 +45,7 @@ enum Code {
CODE_SAVE_SCREENSHOT2,
CODE_CANCEL_ALL_PLAYER_OPTIONS,
CODE_BACK_IN_EVENT_MODE,
CODE_CLOSE_CURRENT_FOLDER,
NUM_Code // leave this at the end
};
@@ -60,6 +61,7 @@ public:
static bool EnteredCode( GameController controller, Code code );
static bool EnteredPrevGroup( GameController controller );
static bool EnteredNextGroup( GameController controller );
static bool EnteredCloseFolder( GameController controller );
// todo: move to PlayerOptions.h -aj
void ChangeScrollSpeed( GameController controller, bool bIncrement );
+12
View File
@@ -739,6 +739,18 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
AfterMusicChange();
}
}
else if( CodeDetector::EnteredCloseFolder(input.GameI.controller) )
{
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
m_soundLocked.Play();
else
{
RString sCurSection = m_MusicWheel.GetSelectedSection();
m_MusicWheel.SelectSection(sCurSection);
m_MusicWheel.SetOpenSection("");
AfterMusicChange();
}
}
else
{
return false;