add MaxCourseEntriesBeforeShowVarious so that Artist doesn't scroll through 10s of values and BPM display doesn't display a meaningless range for endless courses
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Course.h"
|
||||
#include "Style.h"
|
||||
#include "ActorUtil.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
BPMDisplay::BPMDisplay()
|
||||
{
|
||||
@@ -67,8 +68,11 @@ void BPMDisplay::Update( float fDeltaTime )
|
||||
{
|
||||
m_fBPMFrom = -1;
|
||||
m_textBPM.SetText( (RandomFloat(0,1)>0.90) ? CString("xxx") : ssprintf("%03.0f",RandomFloat(0,600)) );
|
||||
} else if(m_fBPMFrom == -1)
|
||||
}
|
||||
else if(m_fBPMFrom == -1)
|
||||
{
|
||||
m_fBPMFrom = m_fBPMTo;
|
||||
}
|
||||
}
|
||||
|
||||
// update m_textBPM
|
||||
@@ -84,8 +88,17 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
{
|
||||
ASSERT( !bpms.vfBpms.empty() );
|
||||
|
||||
m_BPMS.clear();
|
||||
|
||||
const vector<float> &BPMS = bpms.vfBpms;
|
||||
|
||||
if( BPMS.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
{
|
||||
m_BPMS.push_back( -1 );
|
||||
m_textBPM.SetText( "Various" );
|
||||
return;
|
||||
}
|
||||
|
||||
bool AllIdentical = true;
|
||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||
{
|
||||
@@ -110,9 +123,12 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
m_textBPM.SetText( ssprintf("%i", MinBPM) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textBPM.SetText( ssprintf("%i%s%i", MinBPM, SEPARATOR.GetValue().c_str(), MaxBPM) );
|
||||
} else {
|
||||
m_BPMS.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||
{
|
||||
m_BPMS.push_back(BPMS[i]);
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
|
||||
CString PLAYER_COLOR_NAME( size_t p ) { return ssprintf("ColorP%d",p+1); }
|
||||
|
||||
ThemeMetric<CString> INITIAL_SCREEN ("Common","InitialScreen");
|
||||
ThemeMetric<CString> FIRST_RUN_INITIAL_SCREEN ("Common","FirstRunInitialScreen");
|
||||
ThemeMetric<CString> DEFAULT_MODIFIERS ("Common","DefaultModifiers" );
|
||||
ThemeMetric<CString> DEFAULT_CPU_MODIFIERS ("Common","DefaultCpuModifiers" );
|
||||
ThemeMetric1D<RageColor> PLAYER_COLOR ("Common",PLAYER_COLOR_NAME,NUM_PLAYERS);
|
||||
ThemeMetric<float> JOIN_PAUSE_SECONDS ("Common","JoinPauseSeconds");
|
||||
ThemeMetric<CString> WINDOW_TITLE ("Common","WindowTitle");
|
||||
ThemeMetric<bool> HOME_EDIT_MODE ("Common","HomeEditMode");
|
||||
ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE ("Common","MaxStepsLoadedFromProfile");
|
||||
ThemeMetric<CString> INITIAL_SCREEN ("Common","InitialScreen");
|
||||
ThemeMetric<CString> FIRST_RUN_INITIAL_SCREEN ("Common","FirstRunInitialScreen");
|
||||
ThemeMetric<CString> DEFAULT_MODIFIERS ("Common","DefaultModifiers" );
|
||||
ThemeMetric<CString> DEFAULT_CPU_MODIFIERS ("Common","DefaultCpuModifiers" );
|
||||
ThemeMetric1D<RageColor> PLAYER_COLOR ("Common",PLAYER_COLOR_NAME,NUM_PLAYERS);
|
||||
ThemeMetric<float> JOIN_PAUSE_SECONDS ("Common","JoinPauseSeconds");
|
||||
ThemeMetric<CString> WINDOW_TITLE ("Common","WindowTitle");
|
||||
ThemeMetric<bool> HOME_EDIT_MODE ("Common","HomeEditMode");
|
||||
ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE ("Common","MaxStepsLoadedFromProfile");
|
||||
ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS ("Common","MaxCourseEntriesBeforeShowVarious");
|
||||
|
||||
|
||||
class ThemeMetricDifficultiesToShow : ThemeMetric<CString>
|
||||
|
||||
@@ -16,6 +16,7 @@ extern ThemeMetric<float> JOIN_PAUSE_SECONDS;
|
||||
extern ThemeMetric<CString> WINDOW_TITLE;
|
||||
extern ThemeMetric<bool> HOME_EDIT_MODE;
|
||||
extern ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE;
|
||||
extern ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS;
|
||||
|
||||
namespace CommonMetrics
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Style.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "Command.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -338,7 +339,9 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
|
||||
pTrail->GetDisplayBpms( bpms );
|
||||
}
|
||||
|
||||
if( bpms.IsSecret() )
|
||||
if( bpms.vfBpms.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
{} // add nothing
|
||||
else if( bpms.IsSecret() )
|
||||
sTitle += ssprintf( " (??" "?)" ); /* split so gcc doesn't think this is a trigraph */
|
||||
else if( bpms.BpmIsConstant() )
|
||||
sTitle += ssprintf( " (%.0f)", bpms.GetMin() );
|
||||
|
||||
@@ -1726,6 +1726,14 @@ void ScreenSelectMusic::AfterMusicChange()
|
||||
// update stage counter display (long versions/marathons)
|
||||
m_sprStage.Load( THEME->GetPathG(m_sName,"stage "+GAMESTATE->GetStageText()) );
|
||||
|
||||
if( m_Artists.size() > MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
|
||||
{
|
||||
m_Artists.clear();
|
||||
m_AltArtists.clear();
|
||||
m_Artists.push_back( "Various Artists" );
|
||||
m_AltArtists.push_back( "Various Artists" );
|
||||
}
|
||||
|
||||
m_Artist.SetTips( m_Artists, m_AltArtists );
|
||||
|
||||
FOREACH_HumanPlayer( p )
|
||||
|
||||
Reference in New Issue
Block a user