clean up difficulty steps description
This commit is contained in:
@@ -139,7 +139,7 @@ EditMenu::~EditMenu()
|
||||
|
||||
}
|
||||
|
||||
void EditMenu::RefreshSteps()
|
||||
void EditMenu::RefreshAll()
|
||||
{
|
||||
OnRowValueChanged( ROW_SONG );
|
||||
}
|
||||
@@ -278,16 +278,18 @@ void EditMenu::OnRowValueChanged( Row row )
|
||||
// fall through
|
||||
case ROW_STEPS:
|
||||
{
|
||||
CString s = DifficultyToThemedString(GetSelectedDifficulty());
|
||||
CString s;
|
||||
Steps *pSteps = GetSelectedSteps();
|
||||
if( pSteps && GetSelectedDifficulty() == DIFFICULTY_EDIT )
|
||||
s += " - " + pSteps->GetDescription();
|
||||
m_textValue[ROW_STEPS].SetText( s );
|
||||
if( GetSelectedSteps() )
|
||||
m_Meter.SetFromSteps( GetSelectedSteps() );
|
||||
s = pSteps->GetDescription() + " (" + DifficultyToThemedString(DIFFICULTY_EDIT) + ")";
|
||||
else
|
||||
m_Meter.SetFromMeterAndDifficulty( 0, GetSelectedDifficulty() );
|
||||
s = DifficultyToThemedString(GetSelectedDifficulty());
|
||||
m_textValue[ROW_STEPS].SetText( s );
|
||||
}
|
||||
if( GetSelectedSteps() )
|
||||
m_Meter.SetFromSteps( GetSelectedSteps() );
|
||||
else
|
||||
m_Meter.SetFromMeterAndDifficulty( 0, GetSelectedDifficulty() );
|
||||
// fall through
|
||||
case ROW_SOURCE_STEPS_TYPE:
|
||||
m_textLabel[ROW_SOURCE_STEPS_TYPE].SetHidden( GetSelectedSteps() ? true : false );
|
||||
@@ -310,7 +312,15 @@ void EditMenu::OnRowValueChanged( Row row )
|
||||
case ROW_SOURCE_STEPS:
|
||||
m_textLabel[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
||||
m_textValue[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false );
|
||||
m_textValue[ROW_SOURCE_STEPS].SetText( DifficultyToThemedString(GetSelectedSourceDifficulty()) );
|
||||
{
|
||||
CString s;
|
||||
Steps *pSourceSteps = GetSelectedSourceSteps();
|
||||
if( pSourceSteps && GetSelectedSourceDifficulty() == DIFFICULTY_EDIT )
|
||||
s = pSourceSteps->GetDescription() + " (" + DifficultyToThemedString(DIFFICULTY_EDIT) + ")";
|
||||
else
|
||||
s = DifficultyToThemedString(GetSelectedSourceDifficulty());
|
||||
m_textValue[ROW_SOURCE_STEPS].SetText( s );
|
||||
}
|
||||
if( GetSelectedSourceSteps() )
|
||||
m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() );
|
||||
else
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
return s[a];
|
||||
}
|
||||
|
||||
void RefreshSteps();
|
||||
void RefreshAll();
|
||||
|
||||
|
||||
CString GetSelectedGroup() const { ASSERT(m_iSelection[ROW_GROUP] < (int)m_sGroups.size()); return m_sGroups[m_iSelection[ROW_GROUP]]; }
|
||||
|
||||
@@ -54,7 +54,7 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
switch( SM )
|
||||
{
|
||||
case SM_RefreshSelector:
|
||||
m_Selector.RefreshSteps();
|
||||
m_Selector.RefreshAll();
|
||||
break;
|
||||
case SM_GoToPrevScreen:
|
||||
SCREENMAN->SetNewScreen( PREV_SCREEN );
|
||||
@@ -103,7 +103,7 @@ static CString GetCopyDescription( const Steps *pSourceSteps )
|
||||
s = pSourceSteps->GetDescription();
|
||||
else
|
||||
s = DifficultyToThemedString( pSourceSteps->GetDifficulty() );
|
||||
return "From " + s;
|
||||
return s;
|
||||
}
|
||||
|
||||
void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
@@ -146,7 +146,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
case EditMenu::ACTION_DELETE:
|
||||
ASSERT( pSteps );
|
||||
SCREENMAN->Prompt( SM_RefreshSelector, "These steps will be lost permanently.\n\nContinue with delete?", true, false, DeleteCurSteps );
|
||||
m_Selector.RefreshSteps();
|
||||
m_Selector.RefreshAll();
|
||||
return;
|
||||
case EditMenu::ACTION_COPY:
|
||||
ASSERT( !pSteps );
|
||||
@@ -162,8 +162,12 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
SCREENMAN->SystemMessage( "Steps created from copy." );
|
||||
SOUND->PlayOnce( THEME->GetPathS(m_sName,"create") );
|
||||
m_Selector.RefreshSteps();
|
||||
pSong->Save();
|
||||
|
||||
GAMESTATE->m_pCurSong.Set( pSong );
|
||||
GAMESTATE->m_pCurSteps[0].Set( pNewSteps );
|
||||
|
||||
m_Selector.RefreshAll();
|
||||
}
|
||||
return;
|
||||
case EditMenu::ACTION_AUTOGEN:
|
||||
@@ -181,8 +185,12 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
SCREENMAN->SystemMessage( "Steps created from AutoGen." );
|
||||
SOUND->PlayOnce( THEME->GetPathS(m_sName,"create") );
|
||||
m_Selector.RefreshSteps();
|
||||
pSong->Save();
|
||||
|
||||
GAMESTATE->m_pCurSong.Set( pSong );
|
||||
GAMESTATE->m_pCurSteps[0].Set( pNewSteps );
|
||||
|
||||
m_Selector.RefreshAll();
|
||||
}
|
||||
return;
|
||||
case EditMenu::ACTION_BLANK:
|
||||
@@ -199,7 +207,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
SCREENMAN->SystemMessage( "Blank Steps created." );
|
||||
SOUND->PlayOnce( THEME->GetPathS(m_sName,"create") );
|
||||
m_Selector.RefreshSteps();
|
||||
m_Selector.RefreshAll();
|
||||
pSong->Save();
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user