old change: register DifficultyIcon

This commit is contained in:
Glenn Maynard
2005-06-17 01:31:21 +00:00
parent ea81664645
commit e65a91dfc9
2 changed files with 20 additions and 0 deletions
+19
View File
@@ -9,6 +9,10 @@
#include "RageDisplay.h"
#include "arch/Dialog/Dialog.h"
#include "Trail.h"
#include "ActorUtil.h"
#include "XmlFile.h"
REGISTER_ACTOR_CLASS(DifficultyIcon)
DifficultyIcon::DifficultyIcon()
{
@@ -36,6 +40,21 @@ bool DifficultyIcon::Load( CString sPath )
return true;
}
void DifficultyIcon::LoadFromNode( const CString& sDir, const XNode* pNode )
{
CString sFile;
if( !pNode->GetAttrValue( "File", sFile ) )
RageException::Throw( "MeterDisplay in " + sDir + " missing File attribute" );
sFile = sDir + sFile;
ActorUtil::ResolvePath( sFile, sDir );
Load( sFile );
// skip Sprite::LoadFromNode
Actor::LoadFromNode( sDir, pNode );
}
void DifficultyIcon::SetFromSteps( PlayerNumber pn, const Steps* pSteps )
{
if( pSteps == NULL )
+1
View File
@@ -18,6 +18,7 @@ public:
virtual bool EarlyAbortDraw() { return m_bBlank || Sprite::EarlyAbortDraw(); }
bool Load( CString sFilePath );
virtual void LoadFromNode( const CString& sDir, const XNode* pNode );
void SetFromSteps( PlayerNumber pn, const Steps* pSteps );
void SetFromTrail( PlayerNumber pn, const Trail* pTrail );