add "CancelAll" code for PlayerOptions screen

This commit is contained in:
Chris Danford
2004-02-23 07:44:57 +00:00
parent ddeb153ed3
commit e8f3886d2c
4 changed files with 14 additions and 1 deletions
+1
View File
@@ -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
+2 -1
View File
@@ -62,7 +62,8 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
"NextGame2",
"NextBannerGroup",
"NextBannerGroup2",
"SaveScreenshot"
"SaveScreenshot",
"CancelAllPlayerOptions",
};
CodeItem g_CodeItems[CodeDetector::NUM_CODES];
+1
View File
@@ -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
};
+10
View File
@@ -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 );
}