diff --git a/stepmania/src/HelpDisplay.cpp b/stepmania/src/HelpDisplay.cpp index 55b2f6d2f6..be59742c16 100644 --- a/stepmania/src/HelpDisplay.cpp +++ b/stepmania/src/HelpDisplay.cpp @@ -15,24 +15,26 @@ #include "PrefsManager.h" #include "RageLog.h" #include "ThemeManager.h" +#include "ActorUtil.h" - -const float TIP_SHOW_TIME = 3.5f; +#define TIP_SHOW_TIME THEME->GetMetricF(m_sName,"TipShowTime") HelpDisplay::HelpDisplay() { - LOG->Trace( "HelpDisplay::HelpDisplay()" ); - - m_textTip.LoadFromFont( THEME->GetPathToF("HelpDisplay") ); - m_textTip.SetEffectDiffuseBlink(); - m_textTip.EnableShadow( false ); - this->AddChild( &m_textTip ); - m_iCurTipIndex = 0; - m_fSecsUntilSwitch = TIP_SHOW_TIME; + m_fSecsUntilSwitch = 0; } +void HelpDisplay::Load() +{ + m_textTip.SetName( "Tip" ); + m_textTip.LoadFromFont( THEME->GetPathToF("HelpDisplay") ); + ON_COMMAND( m_textTip ); + this->AddChild( &m_textTip ); + + m_fSecsUntilSwitch = TIP_SHOW_TIME; +} void HelpDisplay::SetTips( const CStringArray &arrayTips ) { diff --git a/stepmania/src/HelpDisplay.h b/stepmania/src/HelpDisplay.h index 3c90a4b9c8..90a6e38e9a 100644 --- a/stepmania/src/HelpDisplay.h +++ b/stepmania/src/HelpDisplay.h @@ -19,6 +19,7 @@ class HelpDisplay : public ActorFrame { public: HelpDisplay(); + void Load(); void SetTips( const CStringArray &arrayTips ); virtual void Update( float fDeltaTime ); diff --git a/stepmania/src/MenuElements.cpp b/stepmania/src/MenuElements.cpp index 227e3ed38a..c5d87faf17 100644 --- a/stepmania/src/MenuElements.cpp +++ b/stepmania/src/MenuElements.cpp @@ -82,7 +82,8 @@ void MenuElements::Load( CString sClassName ) UtilOnCommand( m_autoFooter, "MenuElements" ); this->AddChild( m_autoFooter ); - m_textHelp->SetName( "Help" ); + m_textHelp->SetName( "HelpDisplay", "Help" ); + m_textHelp->Load(); UtilOnCommand( m_textHelp, "MenuElements" ); CStringArray asHelpTips; split( THEME->GetMetric(m_sName,"HelpText"), "\n", asHelpTips );