TIMER_SECONDS: int -> float
This commit is contained in:
@@ -15,8 +15,8 @@ static const ThemeMetric<int> WARNING_BEEP_START ("MenuTimer","WarningBeepStart"
|
||||
#define WARNING_COMMAND(i) THEME->GetMetricA ("MenuTimer", ssprintf("WarningCommand%i",i))
|
||||
static const ThemeMetric<apActorCommands> ON_COMMAND ("MenuTimer","OnCommand");
|
||||
|
||||
static const int TIMER_SECONDS = 99;
|
||||
static const int MAX_STALL_SECONDS = 30;
|
||||
static const float TIMER_PAUSE_SECONDS = 99;
|
||||
static const float MAX_STALL_SECONDS = 30;
|
||||
|
||||
MenuTimer::MenuTimer()
|
||||
{
|
||||
@@ -34,7 +34,7 @@ MenuTimer::MenuTimer()
|
||||
this->AddChild( &m_textDigit1 );
|
||||
this->AddChild( &m_textDigit2 );
|
||||
|
||||
SetSeconds( TIMER_SECONDS );
|
||||
SetSeconds( TIMER_PAUSE_SECONDS );
|
||||
|
||||
m_soundBeep.Load( THEME->GetPathS("MenuTimer","tick") );
|
||||
}
|
||||
@@ -132,15 +132,15 @@ void MenuTimer::Stall()
|
||||
m_fStallSecondsLeft -= ToAdd;
|
||||
}
|
||||
|
||||
void MenuTimer::SetSeconds( int iSeconds )
|
||||
void MenuTimer::SetSeconds( float fSeconds )
|
||||
{
|
||||
m_fSecondsLeft = (float)iSeconds;
|
||||
m_fSecondsLeft = fSeconds;
|
||||
CLAMP( m_fSecondsLeft, 0, 99 );
|
||||
|
||||
m_textDigit1.RunCommands( ON_COMMAND );
|
||||
m_textDigit2.RunCommands( ON_COMMAND );
|
||||
|
||||
SetText( iSeconds );
|
||||
SetText( (int)fSeconds );
|
||||
}
|
||||
|
||||
void MenuTimer::Start()
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
void SetSeconds( int iTimerSeconds );
|
||||
void SetSeconds( float fSeconds );
|
||||
void Start(); // resume countdown from paused
|
||||
void Pause(); // don't count down
|
||||
void Stop(); // set to "00" and pause
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define NUM_CHARS_TO_DRAW_BEHIND THEME->GetMetricI("ScreenNameEntry","NumCharsToDrawBehind")
|
||||
#define NUM_CHARS_TO_DRAW_TOTAL THEME->GetMetricI("ScreenNameEntry","NumCharsToDrawTotal")
|
||||
#define FAKE_BEATS_PER_SEC THEME->GetMetricF("ScreenNameEntry","FakeBeatsPerSec")
|
||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenNameEntry","TimerSeconds")
|
||||
#define TIMER_SECONDS THEME->GetMetricF("ScreenNameEntry","TimerSeconds")
|
||||
#define MAX_RANKING_NAME_LENGTH THEME->GetMetricI(m_sName,"MaxRankingNameLength")
|
||||
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
|
||||
#define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str()))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "GameSoundManager.h"
|
||||
#include "AnnouncerManager.h"
|
||||
|
||||
#define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds")
|
||||
#define TIMER_SECONDS THEME->GetMetricF(m_sName,"TimerSeconds")
|
||||
#define TIMER_STEALTH THEME->GetMetricB(m_sName,"TimerStealth")
|
||||
#define STYLE_ICON THEME->GetMetricB(m_sName,"StyleIcon")
|
||||
#define MEMORY_CARD_ICONS THEME->GetMetricB(m_sName,"MemoryCardIcons")
|
||||
|
||||
Reference in New Issue
Block a user