skip over Steps row in EditMenu_Home
This commit is contained in:
+34
-16
@@ -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 );
|
||||||
m_soundChangeRow.Play();
|
ChangeToRow( dest );
|
||||||
}
|
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 );
|
||||||
m_soundChangeRow.Play();
|
ChangeToRow( dest );
|
||||||
}
|
m_soundChangeRow.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditMenu::Left()
|
void EditMenu::Left()
|
||||||
|
|||||||
+15
-14
@@ -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();
|
||||||
@@ -62,15 +63,15 @@ public:
|
|||||||
|
|
||||||
void RefreshAll();
|
void RefreshAll();
|
||||||
|
|
||||||
RString GetSelectedGroup() const { if( !SHOW_GROUPS.GetValue() ) return GROUP_ALL; ASSERT(m_iSelection[ROW_GROUP] < (int)m_sGroups.size()); return m_sGroups[m_iSelection[ROW_GROUP]]; }
|
RString GetSelectedGroup() const { if( !SHOW_GROUPS.GetValue() ) return GROUP_ALL; ASSERT(m_iSelection[ROW_GROUP] < (int)m_sGroups.size()); return m_sGroups[m_iSelection[ROW_GROUP]]; }
|
||||||
Song* GetSelectedSong() const { ASSERT(m_iSelection[ROW_SONG] < (int)m_pSongs.size()); return m_pSongs[m_iSelection[ROW_SONG]]; }
|
Song* GetSelectedSong() const { ASSERT(m_iSelection[ROW_SONG] < (int)m_pSongs.size()); return m_pSongs[m_iSelection[ROW_SONG]]; }
|
||||||
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]]; }
|
||||||
|
|
||||||
EditMenuRow GetSelectedRow() const { return m_SelectedRow; }
|
EditMenuRow GetSelectedRow() const { return m_SelectedRow; }
|
||||||
|
|
||||||
@@ -84,13 +85,13 @@ private:
|
|||||||
EditMenuRow m_SelectedRow;
|
EditMenuRow m_SelectedRow;
|
||||||
EditMenuRow GetFirstRow() const { return SHOW_GROUPS.GetValue()? ROW_GROUP:ROW_SONG; }
|
EditMenuRow GetFirstRow() const { return SHOW_GROUPS.GetValue()? ROW_GROUP:ROW_SONG; }
|
||||||
int GetRowSize( EditMenuRow er ) const;
|
int GetRowSize( EditMenuRow er ) const;
|
||||||
int m_iSelection[NUM_EditMenuRow];
|
int m_iSelection[NUM_EditMenuRow];
|
||||||
BitmapText m_textLabel[NUM_EditMenuRow];
|
BitmapText m_textLabel[NUM_EditMenuRow];
|
||||||
BitmapText m_textValue[NUM_EditMenuRow];
|
BitmapText m_textValue[NUM_EditMenuRow];
|
||||||
|
|
||||||
FadingBanner m_GroupBanner;
|
FadingBanner m_GroupBanner;
|
||||||
FadingBanner m_SongBanner;
|
FadingBanner m_SongBanner;
|
||||||
TextBanner m_SongTextBanner;
|
TextBanner m_SongTextBanner;
|
||||||
DifficultyMeter m_Meter;
|
DifficultyMeter m_Meter;
|
||||||
DifficultyMeter m_SourceMeter;
|
DifficultyMeter m_SourceMeter;
|
||||||
|
|
||||||
@@ -102,9 +103,9 @@ private:
|
|||||||
Difficulty dc;
|
Difficulty dc;
|
||||||
};
|
};
|
||||||
|
|
||||||
vector<RString> m_sGroups;
|
vector<RString> m_sGroups;
|
||||||
vector<Song*> m_pSongs;
|
vector<Song*> m_pSongs;
|
||||||
vector<StepsType> m_StepsTypes;
|
vector<StepsType> m_StepsTypes;
|
||||||
vector<StepsAndDifficulty> m_vpSteps;
|
vector<StepsAndDifficulty> m_vpSteps;
|
||||||
vector<StepsAndDifficulty> m_vpSourceSteps;
|
vector<StepsAndDifficulty> m_vpSourceSteps;
|
||||||
vector<EditMenuAction> m_Actions;
|
vector<EditMenuAction> m_Actions;
|
||||||
|
|||||||
Reference in New Issue
Block a user