fix EditMenu next screen logic
This commit is contained in:
@@ -952,8 +952,11 @@ public:
|
|||||||
GAMESTATE->m_pCurSong->GetSteps( m_vSteps, *m_pst, DIFFICULTY_EDIT );
|
GAMESTATE->m_pCurSong->GetSteps( m_vSteps, *m_pst, DIFFICULTY_EDIT );
|
||||||
m_vDifficulties.resize( m_vSteps.size(), DIFFICULTY_EDIT );
|
m_vDifficulties.resize( m_vSteps.size(), DIFFICULTY_EDIT );
|
||||||
|
|
||||||
m_vSteps.push_back( NULL );
|
if( m_sName == "EditSteps" )
|
||||||
m_vDifficulties.push_back( DIFFICULTY_EDIT );
|
{
|
||||||
|
m_vSteps.push_back( NULL );
|
||||||
|
m_vDifficulties.push_back( DIFFICULTY_EDIT );
|
||||||
|
}
|
||||||
|
|
||||||
for( unsigned i=0; i<m_vSteps.size(); i++ )
|
for( unsigned i=0; i<m_vSteps.size(); i++ )
|
||||||
{
|
{
|
||||||
@@ -1100,6 +1103,10 @@ public:
|
|||||||
vbSelectedOut[0] = true;
|
vbSelectedOut[0] = true;
|
||||||
}
|
}
|
||||||
virtual int ExportOption( const OptionRowDefinition &def, PlayerNumber pn, const vector<bool> &vbSelected ) const
|
virtual int ExportOption( const OptionRowDefinition &def, PlayerNumber pn, const vector<bool> &vbSelected ) const
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
virtual CString GetAndEraseScreen( int iChoice )
|
||||||
{
|
{
|
||||||
Song* pSong = GAMESTATE->m_pCurSong;
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
Steps *pSteps = GAMESTATE->m_pCurSteps[0];
|
Steps *pSteps = GAMESTATE->m_pCurSteps[0];
|
||||||
@@ -1107,13 +1114,13 @@ public:
|
|||||||
StepsType st = GAMESTATE->m_stEdit;
|
StepsType st = GAMESTATE->m_stEdit;
|
||||||
Steps *pSourceNotes = GAMESTATE->m_pEditSourceSteps;
|
Steps *pSourceNotes = GAMESTATE->m_pEditSourceSteps;
|
||||||
|
|
||||||
int iSel = GetOneSelection(vbSelected);
|
EditMenuAction ema = m_vEditMenuActions[iChoice];
|
||||||
EditMenuAction ema = m_vEditMenuActions[ iSel ];
|
|
||||||
switch( ema )
|
switch( ema )
|
||||||
{
|
{
|
||||||
case EDIT_MENU_ACTION_EDIT:
|
case EDIT_MENU_ACTION_EDIT:
|
||||||
// Prepare prepare for ScreenEdit
|
// Prepare prepare for ScreenEdit
|
||||||
ASSERT( pSteps );
|
ASSERT( pSteps );
|
||||||
|
return "ScreenEdit";
|
||||||
break;
|
break;
|
||||||
case EDIT_MENU_ACTION_DELETE:
|
case EDIT_MENU_ACTION_DELETE:
|
||||||
ASSERT( pSteps );
|
ASSERT( pSteps );
|
||||||
@@ -1172,17 +1179,9 @@ public:
|
|||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh the list
|
// refresh the screen since we deleted or added steps
|
||||||
MESSAGEMAN->Broadcast( MESSAGE_CURRENT_SONG_CHANGED );
|
MESSAGEMAN->Broadcast( MESSAGE_CURRENT_SONG_CHANGED );
|
||||||
|
return "";
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
virtual CString GetAndEraseScreen( int iChoice )
|
|
||||||
{
|
|
||||||
if( m_vEditMenuActions[iChoice] == EDIT_MENU_ACTION_EDIT )
|
|
||||||
return "ScreenEdit";
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -259,8 +259,6 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
for( unsigned r = 0; r < OptionRowHandlers.size(); ++r )
|
for( unsigned r = 0; r < OptionRowHandlers.size(); ++r )
|
||||||
{
|
{
|
||||||
const OptionRow &row = *m_Rows[r];
|
|
||||||
|
|
||||||
CHECKPOINT_M( ssprintf("%i/%i", r, int(OptionRowHandlers.size())) );
|
CHECKPOINT_M( ssprintf("%i/%i", r, int(OptionRowHandlers.size())) );
|
||||||
|
|
||||||
ExportOptions( r );
|
ExportOptions( r );
|
||||||
|
|||||||
Reference in New Issue
Block a user