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