save player options automatically if using profile
remove code for saving player options
This commit is contained in:
@@ -3095,7 +3095,6 @@ RandomVanish=
|
||||
// with other song select.
|
||||
SaveScreenshot=MenuLeft-MenuRight-Start
|
||||
CancelAllPlayerOptions=
|
||||
SavePlayerOptions=
|
||||
|
||||
[GrooveRadar]
|
||||
Label1OffsetX=0 // stream
|
||||
|
||||
@@ -64,7 +64,6 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||
"NextBannerGroup2",
|
||||
"SaveScreenshot",
|
||||
"CancelAllPlayerOptions",
|
||||
"SavePlayerOptions",
|
||||
};
|
||||
|
||||
CodeItem g_CodeItems[CodeDetector::NUM_CODES];
|
||||
|
||||
@@ -76,7 +76,6 @@ public:
|
||||
CODE_BW_NEXT_GROUP2,
|
||||
CODE_SAVE_SCREENSHOT,
|
||||
CODE_CANCEL_ALL_PLAYER_OPTIONS,
|
||||
CODE_SAVE_PLAYER_OPTIONS,
|
||||
NUM_CODES // leave this at the end
|
||||
};
|
||||
|
||||
|
||||
@@ -123,18 +123,6 @@ void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventTyp
|
||||
this->PositionUnderlines();
|
||||
}
|
||||
|
||||
if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_SAVE_PLAYER_OPTIONS) )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
{
|
||||
SOUND->PlayOnce( THEME->GetPathToS("ScreenPlayerOptions save") );
|
||||
this->ExportOptions();
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||
pProfile->m_bUsingProfileDefaultModifiers = true;
|
||||
pProfile->m_sDefaultModifiers = GAMESTATE->m_PlayerOptions[pn].GetString();
|
||||
}
|
||||
}
|
||||
|
||||
ScreenOptionsMaster::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
|
||||
// UGLY: Update m_Disqualified whenever Start is pressed
|
||||
@@ -171,6 +159,22 @@ void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
ScreenOptionsMaster::HandleScreenMessage( SM );
|
||||
}
|
||||
|
||||
void ScreenPlayerOptions::ExportOptions()
|
||||
{
|
||||
ScreenOptionsMaster::ExportOptions();
|
||||
|
||||
// automatically save all options to profile
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
{
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||
pProfile->m_bUsingProfileDefaultModifiers = true;
|
||||
pProfile->m_sDefaultModifiers = GAMESTATE->m_PlayerOptions[pn].GetString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenPlayerOptions::UpdateDisqualified()
|
||||
{
|
||||
// save current player options
|
||||
@@ -183,7 +187,7 @@ void ScreenPlayerOptions::UpdateDisqualified()
|
||||
}
|
||||
|
||||
// export the currently selection options, which will fill GAMESTATE->m_PlayerOptions
|
||||
this->ExportOptions();
|
||||
ScreenOptionsMaster::ExportOptions();
|
||||
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
|
||||
@@ -25,6 +25,8 @@ private:
|
||||
void GoToNextState();
|
||||
void GoToPrevState();
|
||||
|
||||
virtual void ExportOptions();
|
||||
|
||||
void UpdateDisqualified();
|
||||
|
||||
bool m_bAcceptedChoices;
|
||||
|
||||
Reference in New Issue
Block a user