add metric to put timer in stealth mode
This commit is contained in:
@@ -94,7 +94,10 @@ void MenuTimer::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( iNewDisplay <= WARNING_BEEP_START )
|
if( iNewDisplay <= WARNING_BEEP_START )
|
||||||
m_soundBeep.Play();
|
{
|
||||||
|
if( m_soundBeep.IsLoaded() )
|
||||||
|
m_soundBeep.Play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ void RageSound::Unload()
|
|||||||
databuf.clear();
|
databuf.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RageSound::IsLoaded()
|
||||||
|
{
|
||||||
|
return Sample != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void RageSound::Fail(CString reason)
|
void RageSound::Fail(CString reason)
|
||||||
{
|
{
|
||||||
LOG->Warn("Decoding %s failed: %s", GetLoadedFilePath().c_str(), reason.c_str() );
|
LOG->Warn("Decoding %s failed: %s", GetLoadedFilePath().c_str(), reason.c_str() );
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public:
|
|||||||
* be set up only if needed. Doesn't fail. */
|
* be set up only if needed. Doesn't fail. */
|
||||||
void LoadSoundReader( SoundReader *pSound );
|
void LoadSoundReader( SoundReader *pSound );
|
||||||
void Unload();
|
void Unload();
|
||||||
|
bool IsLoaded();
|
||||||
|
|
||||||
void StartPlaying();
|
void StartPlaying();
|
||||||
void StopPlaying();
|
void StopPlaying();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
|
|
||||||
#define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds")
|
||||||
|
#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")
|
||||||
|
|
||||||
@@ -65,6 +66,8 @@ ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( s
|
|||||||
if( m_bTimerEnabled )
|
if( m_bTimerEnabled )
|
||||||
{
|
{
|
||||||
m_MenuTimer->SetName( "Timer" );
|
m_MenuTimer->SetName( "Timer" );
|
||||||
|
if( TIMER_STEALTH )
|
||||||
|
m_MenuTimer->EnableStealth( true );
|
||||||
UtilSetXY( m_MenuTimer, m_sName );
|
UtilSetXY( m_MenuTimer, m_sName );
|
||||||
UtilOnCommand( m_MenuTimer, m_sName );
|
UtilOnCommand( m_MenuTimer, m_sName );
|
||||||
ResetTimer();
|
ResetTimer();
|
||||||
|
|||||||
Reference in New Issue
Block a user