Don't pull in HelpDisplay.h everywhere.

This commit is contained in:
Glenn Maynard
2003-11-17 01:01:44 +00:00
parent 2d94c8877b
commit dad045d51b
2 changed files with 9 additions and 6 deletions
+7 -4
View File
@@ -20,6 +20,7 @@
#include "GameState.h" #include "GameState.h"
#include "ThemeManager.h" #include "ThemeManager.h"
#include "MenuTimer.h" #include "MenuTimer.h"
#include "HelpDisplay.h"
#define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds") #define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds")
@@ -29,11 +30,13 @@
MenuElements::MenuElements() MenuElements::MenuElements()
{ {
m_MenuTimer = new MenuTimer; m_MenuTimer = new MenuTimer;
m_textHelp = new HelpDisplay;
} }
MenuElements::~MenuElements() MenuElements::~MenuElements()
{ {
delete m_MenuTimer; delete m_MenuTimer;
delete m_textHelp;
} }
void MenuElements::Load( CString sClassName ) void MenuElements::Load( CString sClassName )
@@ -79,12 +82,12 @@ void MenuElements::Load( CString sClassName )
UtilOnCommand( m_autoFooter, "MenuElements" ); UtilOnCommand( m_autoFooter, "MenuElements" );
this->AddChild( m_autoFooter ); this->AddChild( m_autoFooter );
m_textHelp.SetName( "Help" ); m_textHelp->SetName( "Help" );
UtilOnCommand( m_textHelp, "MenuElements" ); UtilOnCommand( m_textHelp, "MenuElements" );
CStringArray asHelpTips; CStringArray asHelpTips;
split( THEME->GetMetric(m_sName,"HelpText"), "\n", asHelpTips ); split( THEME->GetMetric(m_sName,"HelpText"), "\n", asHelpTips );
m_textHelp.SetTips( asHelpTips ); m_textHelp->SetTips( asHelpTips );
this->AddChild( &m_textHelp ); this->AddChild( m_textHelp );
m_In.Load( THEME->GetPathToB(m_sName+" in") ); m_In.Load( THEME->GetPathToB(m_sName+" in") );
@@ -163,7 +166,7 @@ void MenuElements::DrawTopLayer()
if( m_bTimerEnabled ) if( m_bTimerEnabled )
m_MenuTimer->Draw(); m_MenuTimer->Draw();
m_autoFooter->Draw(); m_autoFooter->Draw();
m_textHelp.Draw(); m_textHelp->Draw();
m_In.Draw(); m_In.Draw();
m_Out.Draw(); m_Out.Draw();
m_Back.Draw(); m_Back.Draw();
+2 -2
View File
@@ -15,12 +15,12 @@
#include "Screen.h" #include "Screen.h"
#include "Sprite.h" #include "Sprite.h"
#include "Transition.h" #include "Transition.h"
#include "HelpDisplay.h"
#include "BGAnimation.h" #include "BGAnimation.h"
#include "ActorUtil.h" #include "ActorUtil.h"
#include "RageSound.h" #include "RageSound.h"
class MenuTimer; class MenuTimer;
class HelpDisplay;
class MenuElements : public ActorFrame class MenuElements : public ActorFrame
{ {
public: public:
@@ -49,7 +49,7 @@ public: // let owner tinker with these objects
Sprite m_sprStyleIcon; Sprite m_sprStyleIcon;
MenuTimer *m_MenuTimer; MenuTimer *m_MenuTimer;
AutoActor m_autoFooter; AutoActor m_autoFooter;
HelpDisplay m_textHelp; HelpDisplay *m_textHelp;
Transition m_In; Transition m_In;
Transition m_Out; Transition m_Out;