add meter to options screen Steps row
set preferred difficulty when changing options screen Steps row
This commit is contained in:
@@ -149,12 +149,14 @@ void DifficultyList::SetFromGameState()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
met.SetFromNotes( m_CurSteps[m] );
|
Steps* pSteps = m_CurSteps[m];
|
||||||
const CString desc = m_CurSteps[m]->GetDescription();
|
|
||||||
|
met.SetFromNotes( pSteps );
|
||||||
|
Difficulty dc = pSteps->GetDifficulty();
|
||||||
m_Descriptions[m].SetZoomX(1);
|
m_Descriptions[m].SetZoomX(1);
|
||||||
m_Descriptions[m].SetTextMaxWidth( DESCRIPTION_MAX_WIDTH, SONGMAN->GetDifficultyThemeName(desc) );
|
m_Descriptions[m].SetTextMaxWidth( DESCRIPTION_MAX_WIDTH, SONGMAN->GetDifficultyThemeName(dc) );
|
||||||
/* Don't mess with alpha; it might be fading on. */
|
/* Don't mess with alpha; it might be fading on. */
|
||||||
m_Descriptions[m].SetDiffuseColor( SONGMAN->GetDifficultyColor( m_CurSteps[m]->GetDifficulty() ) );
|
m_Descriptions[m].SetDiffuseColor( SONGMAN->GetDifficultyColor(dc) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,16 +105,17 @@ void ScreenOptionsMaster::SetStep( OptionRow &row, OptionRowHandler &hand )
|
|||||||
}
|
}
|
||||||
else if( GAMESTATE->m_pCurSong ) // playing a song
|
else if( GAMESTATE->m_pCurSong ) // playing a song
|
||||||
{
|
{
|
||||||
vector<Steps*> vNotes;
|
vector<Steps*> vSteps;
|
||||||
GAMESTATE->m_pCurSong->GetSteps( vNotes, GAMESTATE->GetCurrentStyleDef()->m_StepsType );
|
GAMESTATE->m_pCurSong->GetSteps( vSteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType );
|
||||||
SortNotesArrayByDifficulty( vNotes );
|
SortNotesArrayByDifficulty( vSteps );
|
||||||
for( unsigned i=0; i<vNotes.size(); i++ )
|
for( unsigned i=0; i<vSteps.size(); i++ )
|
||||||
{
|
{
|
||||||
CString s = vNotes[i]->GetDescription();
|
Steps* pSteps = vSteps[i];
|
||||||
s.MakeUpper();
|
|
||||||
|
|
||||||
// convert to theme-defined values
|
CString s;
|
||||||
s = SONGMAN->GetDifficultyThemeName(s);
|
// convert to theme-defined difficulty name
|
||||||
|
s = SONGMAN->GetDifficultyThemeName( pSteps->GetDifficulty() );
|
||||||
|
s += ssprintf( " (%d)", pSteps->GetMeter() );
|
||||||
|
|
||||||
row.choices.push_back( s );
|
row.choices.push_back( s );
|
||||||
}
|
}
|
||||||
@@ -443,10 +444,14 @@ int ScreenOptionsMaster::ExportOption( const OptionRow &row, const OptionRowHand
|
|||||||
}
|
}
|
||||||
else if( GAMESTATE->m_pCurSong ) // playing a song
|
else if( GAMESTATE->m_pCurSong ) // playing a song
|
||||||
{
|
{
|
||||||
vector<Steps*> vNotes;
|
vector<Steps*> vSteps;
|
||||||
GAMESTATE->m_pCurSong->GetSteps( vNotes, GAMESTATE->GetCurrentStyleDef()->m_StepsType );
|
GAMESTATE->m_pCurSong->GetSteps( vSteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType );
|
||||||
SortNotesArrayByDifficulty( vNotes );
|
SortNotesArrayByDifficulty( vSteps );
|
||||||
GAMESTATE->m_pCurNotes[pn] = vNotes[ sel ];
|
Steps* pSteps = vSteps[ sel ];
|
||||||
|
// set current notes
|
||||||
|
GAMESTATE->m_pCurNotes[pn] = pSteps;
|
||||||
|
// set preferred difficulty
|
||||||
|
GAMESTATE->m_PreferredDifficulty[pn] = pSteps->GetDifficulty();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -914,16 +914,16 @@ RageColor SongManager::GetDifficultyColor( Difficulty dc ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CString SongManager::GetDifficultyThemeName( const CString &in ) const
|
CString SongManager::GetDifficultyThemeName( Difficulty dc ) const
|
||||||
{
|
{
|
||||||
switch( StringToDifficulty(in) )
|
switch( dc )
|
||||||
{
|
{
|
||||||
case DIFFICULTY_BEGINNER: return BEGINNER_DESCRIPTION;
|
case DIFFICULTY_BEGINNER: return BEGINNER_DESCRIPTION;
|
||||||
case DIFFICULTY_EASY: return EASY_DESCRIPTION;
|
case DIFFICULTY_EASY: return EASY_DESCRIPTION;
|
||||||
case DIFFICULTY_MEDIUM: return MEDIUM_DESCRIPTION;
|
case DIFFICULTY_MEDIUM: return MEDIUM_DESCRIPTION;
|
||||||
case DIFFICULTY_HARD: return HARD_DESCRIPTION;
|
case DIFFICULTY_HARD: return HARD_DESCRIPTION;
|
||||||
case DIFFICULTY_CHALLENGE: return CHALLENGE_DESCRIPTION;
|
case DIFFICULTY_CHALLENGE: return CHALLENGE_DESCRIPTION;
|
||||||
default: return in; // something else
|
default: ASSERT(0); return ""; // something else
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
RageColor GetGroupColor( const CString &sGroupName );
|
RageColor GetGroupColor( const CString &sGroupName );
|
||||||
RageColor GetSongColor( const Song* pSong );
|
RageColor GetSongColor( const Song* pSong );
|
||||||
RageColor GetDifficultyColor( Difficulty dc ) const;
|
RageColor GetDifficultyColor( Difficulty dc ) const;
|
||||||
CString GetDifficultyThemeName( const CString &in ) const;
|
CString GetDifficultyThemeName( Difficulty dc ) const;
|
||||||
|
|
||||||
static CString ShortenGroupName( CString sLongGroupName );
|
static CString ShortenGroupName( CString sLongGroupName );
|
||||||
static int GetNumStagesForSong( const Song* pSong ); // LongVer songs take 2 stages, MarathonVer take 3
|
static int GetNumStagesForSong( const Song* pSong ); // LongVer songs take 2 stages, MarathonVer take 3
|
||||||
|
|||||||
Reference in New Issue
Block a user