bpm cycle code cleaned up

This commit is contained in:
Mike Hawkins
2008-05-09 23:42:28 +00:00
parent b660e8799b
commit 98917ce970
3 changed files with 5 additions and 17 deletions
+1 -3
View File
@@ -2583,9 +2583,7 @@ SetRandomCommand=diffusetopedge,color("#fb9c57");diffusebottomedge,color("#fb575
SetExtraCommand=diffusetopedge,color("#fb5757");diffusebottomedge,color("#9c4242")
Cycle=true
NoBpmText="000"
-- Options: vslow, slow, default, fast, vfast, hyper
RandomCycleSpeed=default
RandomCycleSpeed=0.2
Separator="-"
ShowQMarksInRandomCycle=true
+3 -13
View File
@@ -158,20 +158,10 @@ void BPMDisplay::CycleRandomly()
RunCommands( SET_RANDOM_COMMAND );
RString sValue = RANDOM_CYCLE_SPEED;
sValue.MakeLower();
m_fCycleTime = (float)RANDOM_CYCLE_SPEED;
if( stricmp(sValue, "vslow") == 0 )
m_fCycleTime = 1.0f;
else if( stricmp(sValue, "slow") == 0 )
m_fCycleTime = 0.5f;
else if( stricmp(sValue, "fast") == 0 )
m_fCycleTime = 0.1f;
else if( stricmp(sValue, "vfast") == 0 )
m_fCycleTime = 0.05f;
else if( stricmp(sValue, "hyper") == 0 )
m_fCycleTime = 0.01f;
else
// Go to default value in event of a negative value in the metrics
if( m_fCycleTime < 0 )
m_fCycleTime = 0.2f;
}
+1 -1
View File
@@ -42,7 +42,7 @@ protected:
ThemeMetric<apActorCommands> SET_EXTRA_COMMAND;
ThemeMetric<bool> CYCLE;
ThemeMetric<bool> SHOW_QMARKS;
ThemeMetric<RString> RANDOM_CYCLE_SPEED;
ThemeMetric<float> RANDOM_CYCLE_SPEED;
ThemeMetric<RString> SEPARATOR;
ThemeMetric<RString> NO_BPM_TEXT;