skip over Steps row in EditMenu_Home
This commit is contained in:
+32
-14
@@ -271,28 +271,46 @@ bool EditMenu::CanGoRight()
|
|||||||
return m_iSelection[m_SelectedRow] != GetRowSize(m_SelectedRow)-1;
|
return m_iSelection[m_SelectedRow] != GetRowSize(m_SelectedRow)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EditMenu::RowIsSelectable( EditMenuRow row )
|
||||||
|
{
|
||||||
|
if( EDIT_MODE == EditMode_Home && row == ROW_STEPS )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( GetSelectedSteps() )
|
||||||
|
{
|
||||||
|
switch( row )
|
||||||
|
{
|
||||||
|
case ROW_SOURCE_STEPS_TYPE:
|
||||||
|
case ROW_SOURCE_STEPS:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void EditMenu::Up()
|
void EditMenu::Up()
|
||||||
{
|
{
|
||||||
if( CanGoUp() )
|
EditMenuRow dest = m_SelectedRow;
|
||||||
{
|
try_again:
|
||||||
if( GetSelectedSteps() && m_SelectedRow==ROW_ACTION )
|
dest = (EditMenuRow)(dest-1);
|
||||||
ChangeToRow( ROW_STEPS );
|
if( !RowIsSelectable(dest) )
|
||||||
else
|
goto try_again;
|
||||||
ChangeToRow( EditMenuRow(m_SelectedRow-1) );
|
ASSERT( dest >= 0 );
|
||||||
|
ChangeToRow( dest );
|
||||||
m_soundChangeRow.Play();
|
m_soundChangeRow.Play();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditMenu::Down()
|
void EditMenu::Down()
|
||||||
{
|
{
|
||||||
if( CanGoDown() )
|
EditMenuRow dest = m_SelectedRow;
|
||||||
{
|
try_again:
|
||||||
if( GetSelectedSteps() && m_SelectedRow==ROW_STEPS )
|
dest = (EditMenuRow)(dest+1);
|
||||||
ChangeToRow( ROW_ACTION );
|
if( !RowIsSelectable(dest) )
|
||||||
else
|
goto try_again;
|
||||||
ChangeToRow( EditMenuRow(m_SelectedRow+1) );
|
ASSERT( dest < NUM_EditMenuRow );
|
||||||
|
ChangeToRow( dest );
|
||||||
m_soundChangeRow.Play();
|
m_soundChangeRow.Play();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditMenu::Left()
|
void EditMenu::Left()
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public:
|
|||||||
bool CanGoDown();
|
bool CanGoDown();
|
||||||
bool CanGoLeft();
|
bool CanGoLeft();
|
||||||
bool CanGoRight();
|
bool CanGoRight();
|
||||||
|
bool RowIsSelectable( EditMenuRow row );
|
||||||
|
|
||||||
void Up();
|
void Up();
|
||||||
void Down();
|
void Down();
|
||||||
@@ -67,7 +68,7 @@ public:
|
|||||||
StepsType GetSelectedStepsType() const { ASSERT(m_iSelection[ROW_STEPS_TYPE] < (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]]; }
|
StepsType GetSelectedStepsType() const { ASSERT(m_iSelection[ROW_STEPS_TYPE] < (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]]; }
|
||||||
Steps* GetSelectedSteps() const { ASSERT(m_iSelection[ROW_STEPS] < (int)m_vpSteps.size()); return m_vpSteps[m_iSelection[ROW_STEPS]].pSteps; }
|
Steps* GetSelectedSteps() const { ASSERT(m_iSelection[ROW_STEPS] < (int)m_vpSteps.size()); return m_vpSteps[m_iSelection[ROW_STEPS]].pSteps; }
|
||||||
Difficulty GetSelectedDifficulty() const { ASSERT(m_iSelection[ROW_STEPS] < (int)m_vpSteps.size()); return m_vpSteps[m_iSelection[ROW_STEPS]].dc; }
|
Difficulty GetSelectedDifficulty() const { ASSERT(m_iSelection[ROW_STEPS] < (int)m_vpSteps.size()); return m_vpSteps[m_iSelection[ROW_STEPS]].dc; }
|
||||||
StepsType GetSelectedSourceStepsType() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS_TYPE]< (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_SOURCE_STEPS_TYPE]]; }
|
StepsType GetSelectedSourceStepsType() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS_TYPE] < (int)m_StepsTypes.size()); return m_StepsTypes[m_iSelection[ROW_SOURCE_STEPS_TYPE]]; }
|
||||||
Steps* GetSelectedSourceSteps() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS] < (int)m_vpSourceSteps.size()); return m_vpSourceSteps[m_iSelection[ROW_SOURCE_STEPS]].pSteps; }
|
Steps* GetSelectedSourceSteps() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS] < (int)m_vpSourceSteps.size()); return m_vpSourceSteps[m_iSelection[ROW_SOURCE_STEPS]].pSteps; }
|
||||||
Difficulty GetSelectedSourceDifficulty() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS] < (int)m_vpSourceSteps.size()); return m_vpSourceSteps[m_iSelection[ROW_SOURCE_STEPS]].dc; }
|
Difficulty GetSelectedSourceDifficulty() const { ASSERT(m_iSelection[ROW_SOURCE_STEPS] < (int)m_vpSourceSteps.size()); return m_vpSourceSteps[m_iSelection[ROW_SOURCE_STEPS]].dc; }
|
||||||
EditMenuAction GetSelectedAction() const { ASSERT(m_iSelection[ROW_ACTION] < (int)m_Actions.size()); return m_Actions[m_iSelection[ROW_ACTION]]; }
|
EditMenuAction GetSelectedAction() const { ASSERT(m_iSelection[ROW_ACTION] < (int)m_Actions.size()); return m_Actions[m_iSelection[ROW_ACTION]]; }
|
||||||
|
|||||||
Reference in New Issue
Block a user