add "Blank" item in SourceSteps
This commit is contained in:
@@ -140,6 +140,8 @@ EditMenu::EditMenu()
|
|||||||
FOREACH_Difficulty( dc )
|
FOREACH_Difficulty( dc )
|
||||||
m_vDifficulties.push_back( dc );
|
m_vDifficulties.push_back( dc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_vSourceDifficulties.push_back( DIFFICULTY_INVALID ); // "blank"
|
||||||
FOREACH_Difficulty( dc )
|
FOREACH_Difficulty( dc )
|
||||||
m_vSourceDifficulties.push_back( dc );
|
m_vSourceDifficulties.push_back( dc );
|
||||||
|
|
||||||
@@ -377,7 +379,11 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
m_vpSourceSteps.clear();
|
m_vpSourceSteps.clear();
|
||||||
FOREACH( Difficulty, m_vSourceDifficulties, dc )
|
FOREACH( Difficulty, m_vSourceDifficulties, dc )
|
||||||
{
|
{
|
||||||
if( *dc == DIFFICULTY_EDIT )
|
if( *dc == DIFFICULTY_INVALID )
|
||||||
|
{
|
||||||
|
m_vpSourceSteps.push_back( NULL );
|
||||||
|
}
|
||||||
|
else if( *dc == DIFFICULTY_EDIT )
|
||||||
{
|
{
|
||||||
vector<Steps*> v;
|
vector<Steps*> v;
|
||||||
GetSelectedSong()->GetSteps( v, GetSelectedSourceStepsType(), DIFFICULTY_EDIT );
|
GetSelectedSong()->GetSteps( v, GetSelectedSourceStepsType(), DIFFICULTY_EDIT );
|
||||||
@@ -396,18 +402,26 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
case ROW_SOURCE_STEPS:
|
case ROW_SOURCE_STEPS:
|
||||||
|
{
|
||||||
m_textLabel[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
m_textLabel[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
||||||
m_textValue[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
m_textValue[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
||||||
{
|
{
|
||||||
CString s;
|
CString s;
|
||||||
Steps *pSourceSteps = GetSelectedSourceSteps();
|
Steps *pSourceSteps = GetSelectedSourceSteps();
|
||||||
if( pSourceSteps && GetSelectedSourceDifficulty() == DIFFICULTY_EDIT )
|
if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID )
|
||||||
|
s = "Blank";
|
||||||
|
else if( pSourceSteps && GetSelectedSourceDifficulty() == DIFFICULTY_EDIT )
|
||||||
s = pSourceSteps->GetDescription() + " (" + DifficultyToThemedString(DIFFICULTY_EDIT) + ")";
|
s = pSourceSteps->GetDescription() + " (" + DifficultyToThemedString(DIFFICULTY_EDIT) + ")";
|
||||||
else
|
else
|
||||||
s = DifficultyToThemedString(GetSelectedSourceDifficulty());
|
s = DifficultyToThemedString(GetSelectedSourceDifficulty());
|
||||||
m_textValue[ROW_SOURCE_STEPS].SetText( s );
|
m_textValue[ROW_SOURCE_STEPS].SetText( s );
|
||||||
}
|
}
|
||||||
if( GetSelectedSourceSteps() )
|
bool bHideMeter = false;
|
||||||
|
if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID )
|
||||||
|
{
|
||||||
|
bHideMeter = true;
|
||||||
|
}
|
||||||
|
else if( GetSelectedSourceSteps() )
|
||||||
{
|
{
|
||||||
m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() );
|
m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() );
|
||||||
m_textSourceMeter.SetText( ssprintf("%d", GetSelectedSourceSteps()->GetMeter()) );
|
m_textSourceMeter.SetText( ssprintf("%d", GetSelectedSourceSteps()->GetMeter()) );
|
||||||
@@ -418,8 +432,8 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
m_SourceMeter.SetFromMeterAndDifficulty( 0, GetSelectedSourceDifficulty() );
|
m_SourceMeter.SetFromMeterAndDifficulty( 0, GetSelectedSourceDifficulty() );
|
||||||
m_textSourceMeter.SetText( ssprintf("%d", 0) );
|
m_textSourceMeter.SetText( ssprintf("%d", 0) );
|
||||||
}
|
}
|
||||||
m_SourceMeter.SetHidden( GetSelectedSteps() ? true : false );
|
m_SourceMeter.SetHidden( (bHideMeter || GetSelectedSteps()) );
|
||||||
m_textSourceMeter.SetHidden( (GetSelectedSteps() == false && GetSelectedSourceSteps()) ? false : true );
|
m_textSourceMeter.SetHidden( bHideMeter || !(GetSelectedSteps() == false && GetSelectedSourceSteps()) );
|
||||||
|
|
||||||
m_Actions.clear();
|
m_Actions.clear();
|
||||||
if( GetSelectedSteps() )
|
if( GetSelectedSteps() )
|
||||||
@@ -432,6 +446,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
m_Actions.push_back( EDIT_MENU_ACTION_CREATE );
|
m_Actions.push_back( EDIT_MENU_ACTION_CREATE );
|
||||||
}
|
}
|
||||||
m_iSelection[ROW_ACTION] = 0;
|
m_iSelection[ROW_ACTION] = 0;
|
||||||
|
}
|
||||||
// fall through
|
// fall through
|
||||||
case ROW_ACTION:
|
case ROW_ACTION:
|
||||||
m_textValue[ROW_ACTION].SetText( EditMenuActionToThemedString(GetSelectedAction()) );
|
m_textValue[ROW_ACTION].SetText( EditMenuActionToThemedString(GetSelectedAction()) );
|
||||||
|
|||||||
Reference in New Issue
Block a user