old change: register DifficultyIcon
This commit is contained in:
@@ -9,6 +9,10 @@
|
|||||||
#include "RageDisplay.h"
|
#include "RageDisplay.h"
|
||||||
#include "arch/Dialog/Dialog.h"
|
#include "arch/Dialog/Dialog.h"
|
||||||
#include "Trail.h"
|
#include "Trail.h"
|
||||||
|
#include "ActorUtil.h"
|
||||||
|
#include "XmlFile.h"
|
||||||
|
|
||||||
|
REGISTER_ACTOR_CLASS(DifficultyIcon)
|
||||||
|
|
||||||
DifficultyIcon::DifficultyIcon()
|
DifficultyIcon::DifficultyIcon()
|
||||||
{
|
{
|
||||||
@@ -36,6 +40,21 @@ bool DifficultyIcon::Load( CString sPath )
|
|||||||
return true;
|
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 )
|
void DifficultyIcon::SetFromSteps( PlayerNumber pn, const Steps* pSteps )
|
||||||
{
|
{
|
||||||
if( pSteps == NULL )
|
if( pSteps == NULL )
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public:
|
|||||||
virtual bool EarlyAbortDraw() { return m_bBlank || Sprite::EarlyAbortDraw(); }
|
virtual bool EarlyAbortDraw() { return m_bBlank || Sprite::EarlyAbortDraw(); }
|
||||||
|
|
||||||
bool Load( CString sFilePath );
|
bool Load( CString sFilePath );
|
||||||
|
virtual void LoadFromNode( const CString& sDir, const XNode* pNode );
|
||||||
|
|
||||||
void SetFromSteps( PlayerNumber pn, const Steps* pSteps );
|
void SetFromSteps( PlayerNumber pn, const Steps* pSteps );
|
||||||
void SetFromTrail( PlayerNumber pn, const Trail* pTrail );
|
void SetFromTrail( PlayerNumber pn, const Trail* pTrail );
|
||||||
|
|||||||
Reference in New Issue
Block a user