[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:
@@ -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);
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user