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 "Course.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
|
#include "CommonMetrics.h"
|
||||||
|
|
||||||
BPMDisplay::BPMDisplay()
|
BPMDisplay::BPMDisplay()
|
||||||
{
|
{
|
||||||
@@ -67,9 +68,12 @@ void BPMDisplay::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
m_fBPMFrom = -1;
|
m_fBPMFrom = -1;
|
||||||
m_textBPM.SetText( (RandomFloat(0,1)>0.90) ? CString("xxx") : ssprintf("%03.0f",RandomFloat(0,600)) );
|
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;
|
m_fBPMFrom = m_fBPMTo;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update m_textBPM
|
// update m_textBPM
|
||||||
if( m_fBPMTo != -1)
|
if( m_fBPMTo != -1)
|
||||||
@@ -84,8 +88,17 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
|||||||
{
|
{
|
||||||
ASSERT( !bpms.vfBpms.empty() );
|
ASSERT( !bpms.vfBpms.empty() );
|
||||||
|
|
||||||
|
m_BPMS.clear();
|
||||||
|
|
||||||
const vector<float> &BPMS = bpms.vfBpms;
|
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;
|
bool AllIdentical = true;
|
||||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||||
{
|
{
|
||||||
@@ -110,9 +123,12 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
|||||||
m_textBPM.SetText( ssprintf("%i", MinBPM) );
|
m_textBPM.SetText( ssprintf("%i", MinBPM) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_textBPM.SetText( ssprintf("%i%s%i", MinBPM, SEPARATOR.GetValue().c_str(), MaxBPM) );
|
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 )
|
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||||
{
|
{
|
||||||
m_BPMS.push_back(BPMS[i]);
|
m_BPMS.push_back(BPMS[i]);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ ThemeMetric<float> JOIN_PAUSE_SECONDS ("Common","JoinPauseSeconds");
|
|||||||
ThemeMetric<CString> WINDOW_TITLE ("Common","WindowTitle");
|
ThemeMetric<CString> WINDOW_TITLE ("Common","WindowTitle");
|
||||||
ThemeMetric<bool> HOME_EDIT_MODE ("Common","HomeEditMode");
|
ThemeMetric<bool> HOME_EDIT_MODE ("Common","HomeEditMode");
|
||||||
ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE ("Common","MaxStepsLoadedFromProfile");
|
ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE ("Common","MaxStepsLoadedFromProfile");
|
||||||
|
ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS ("Common","MaxCourseEntriesBeforeShowVarious");
|
||||||
|
|
||||||
|
|
||||||
class ThemeMetricDifficultiesToShow : ThemeMetric<CString>
|
class ThemeMetricDifficultiesToShow : ThemeMetric<CString>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ extern ThemeMetric<float> JOIN_PAUSE_SECONDS;
|
|||||||
extern ThemeMetric<CString> WINDOW_TITLE;
|
extern ThemeMetric<CString> WINDOW_TITLE;
|
||||||
extern ThemeMetric<bool> HOME_EDIT_MODE;
|
extern ThemeMetric<bool> HOME_EDIT_MODE;
|
||||||
extern ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE;
|
extern ThemeMetric<int> MAX_STEPS_LOADED_FROM_PROFILE;
|
||||||
|
extern ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS;
|
||||||
|
|
||||||
namespace CommonMetrics
|
namespace CommonMetrics
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "ScreenDimensions.h"
|
#include "ScreenDimensions.h"
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
|
#include "CommonMetrics.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -338,7 +339,9 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
|
|||||||
pTrail->GetDisplayBpms( bpms );
|
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 */
|
sTitle += ssprintf( " (??" "?)" ); /* split so gcc doesn't think this is a trigraph */
|
||||||
else if( bpms.BpmIsConstant() )
|
else if( bpms.BpmIsConstant() )
|
||||||
sTitle += ssprintf( " (%.0f)", bpms.GetMin() );
|
sTitle += ssprintf( " (%.0f)", bpms.GetMin() );
|
||||||
|
|||||||
@@ -1726,6 +1726,14 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
// update stage counter display (long versions/marathons)
|
// update stage counter display (long versions/marathons)
|
||||||
m_sprStage.Load( THEME->GetPathG(m_sName,"stage "+GAMESTATE->GetStageText()) );
|
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 );
|
m_Artist.SetTips( m_Artists, m_AltArtists );
|
||||||
|
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
|
|||||||
Reference in New Issue
Block a user