[BPMDisplay] make the "Various" text a theme-able string.
This commit is contained in:
+5
-3
@@ -7,6 +7,7 @@
|
|||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include "CommonMetrics.h"
|
#include "CommonMetrics.h"
|
||||||
|
#include "LocalizedString.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -34,6 +35,7 @@ void BPMDisplay::Load()
|
|||||||
SEPARATOR.Load( m_sName, "Separator" );
|
SEPARATOR.Load( m_sName, "Separator" );
|
||||||
SHOW_QMARKS.Load( m_sName, "ShowQMarksInRandomCycle" );
|
SHOW_QMARKS.Load( m_sName, "ShowQMarksInRandomCycle" );
|
||||||
NO_BPM_TEXT.Load( m_sName, "NoBpmText" );
|
NO_BPM_TEXT.Load( m_sName, "NoBpmText" );
|
||||||
|
VARIOUS_TEXT.Load( m_sName, "VariousText" );
|
||||||
|
|
||||||
RunCommands( SET_NORMAL_COMMAND );
|
RunCommands( SET_NORMAL_COMMAND );
|
||||||
}
|
}
|
||||||
@@ -56,7 +58,7 @@ void BPMDisplay::Update( float fDeltaTime )
|
|||||||
if( !(bool)CYCLE )
|
if( !(bool)CYCLE )
|
||||||
return;
|
return;
|
||||||
if( m_BPMS.size() == 0 )
|
if( m_BPMS.size() == 0 )
|
||||||
return; /* no bpm */
|
return; // no bpm
|
||||||
|
|
||||||
m_fPercentInState -= fDeltaTime / m_fCycleTime;
|
m_fPercentInState -= fDeltaTime / m_fCycleTime;
|
||||||
if( m_fPercentInState < 0 )
|
if( m_fPercentInState < 0 )
|
||||||
@@ -227,8 +229,7 @@ void BPMDisplay::SetVarious()
|
|||||||
{
|
{
|
||||||
m_BPMS.clear();
|
m_BPMS.clear();
|
||||||
m_BPMS.push_back( -1 );
|
m_BPMS.push_back( -1 );
|
||||||
// XXX: this should be a themed string -aj
|
SetText( VARIOUS_TEXT );
|
||||||
SetText( "Various" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BPMDisplay::SetFromGameState()
|
void BPMDisplay::SetFromGameState()
|
||||||
@@ -254,6 +255,7 @@ void BPMDisplay::SetFromGameState()
|
|||||||
NoBPM();
|
NoBPM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SongBPMDisplay (in-game BPM display)
|
||||||
class SongBPMDisplay: public BPMDisplay
|
class SongBPMDisplay: public BPMDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ protected:
|
|||||||
ThemeMetric<float> RANDOM_CYCLE_SPEED;
|
ThemeMetric<float> RANDOM_CYCLE_SPEED;
|
||||||
ThemeMetric<RString> SEPARATOR;
|
ThemeMetric<RString> SEPARATOR;
|
||||||
ThemeMetric<RString> NO_BPM_TEXT;
|
ThemeMetric<RString> NO_BPM_TEXT;
|
||||||
|
ThemeMetric<RString> VARIOUS_TEXT;
|
||||||
|
|
||||||
float m_fBPMFrom, m_fBPMTo;
|
float m_fBPMFrom, m_fBPMTo;
|
||||||
int m_iCurrentBPM;
|
int m_iCurrentBPM;
|
||||||
|
|||||||
Reference in New Issue
Block a user