themable HelpDisplay
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ class HelpDisplay : public ActorFrame
|
||||
{
|
||||
public:
|
||||
HelpDisplay();
|
||||
void Load();
|
||||
void SetTips( const CStringArray &arrayTips );
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user