add "CancelAll" code for PlayerOptions screen
This commit is contained in:
@@ -3072,6 +3072,7 @@ RandomVanish=
|
||||
// next banner group is used only in the banner song select, doesnt interfere
|
||||
// with other song select.
|
||||
SaveScreenshot=MenuLeft-MenuRight-Start
|
||||
CancelAllPlayerOptions=
|
||||
|
||||
[GrooveRadar]
|
||||
Label1OffsetX=0 // stream
|
||||
|
||||
@@ -62,7 +62,8 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||
"NextGame2",
|
||||
"NextBannerGroup",
|
||||
"NextBannerGroup2",
|
||||
"SaveScreenshot"
|
||||
"SaveScreenshot",
|
||||
"CancelAllPlayerOptions",
|
||||
};
|
||||
|
||||
CodeItem g_CodeItems[CodeDetector::NUM_CODES];
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
CODE_BW_NEXT_GROUP,
|
||||
CODE_BW_NEXT_GROUP2,
|
||||
CODE_SAVE_SCREENSHOT,
|
||||
CODE_CANCEL_ALL_PLAYER_OPTIONS,
|
||||
NUM_CODES // leave this at the end
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "RageSounds.h"
|
||||
#include "ScreenSongOptions.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "CodeDetector.h"
|
||||
|
||||
|
||||
#define PREV_SCREEN( play_mode ) THEME->GetMetric ("ScreenPlayerOptions","PrevScreen"+Capitalize(PlayModeToString(play_mode)))
|
||||
@@ -108,6 +109,15 @@ void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventTyp
|
||||
}
|
||||
}
|
||||
|
||||
if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_CANCEL_ALL) )
|
||||
{
|
||||
SOUND->PlayOnce( THEME->GetPathToS("ScreenPlayerOptions cancel all") );
|
||||
GAMESTATE->m_PlayerOptions[MenuI.player].Init();
|
||||
GAMESTATE->m_PlayerOptions[MenuI.player].FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
this->ImportOptions();
|
||||
this->PositionUnderlines();
|
||||
}
|
||||
|
||||
ScreenOptionsMaster::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user