use File in Lua; use Font in XML, for compatibility. Only XML's paths
need manual lookups.
This commit is contained in:
@@ -106,16 +106,14 @@ void BitmapText::LoadFromNode( const XNode* pNode )
|
|||||||
ThemeManager::EvaluateString( sAltText );
|
ThemeManager::EvaluateString( sAltText );
|
||||||
|
|
||||||
RString sFont;
|
RString sFont;
|
||||||
ActorUtil::GetAttrPath( pNode, "Font", sFont );
|
if( !ActorUtil::GetAttrPath(pNode, "File", sFont) )
|
||||||
if( sFont.empty() )
|
{
|
||||||
ActorUtil::GetAttrPath( pNode, "File", sFont ); // accept "File" for backward compatibility
|
if( !pNode->GetAttrValue("Font", sFont) ) // accept "File" for backward compatibility
|
||||||
|
RageException::Throw( "%s: BitmapText: missing the File attribute",
|
||||||
if( sFont == "" )
|
|
||||||
RageException::Throw( "%s: BitmapText: missing the Font attribute",
|
|
||||||
ActorUtil::GetWhere(pNode).c_str() );
|
ActorUtil::GetWhere(pNode).c_str() );
|
||||||
|
|
||||||
if( sFont.Left(1) != "/" )
|
|
||||||
sFont = THEME->GetPathF( "", sFont );
|
sFont = THEME->GetPathF( "", sFont );
|
||||||
|
}
|
||||||
|
|
||||||
LoadFromFont( sFont );
|
LoadFromFont( sFont );
|
||||||
|
|
||||||
SetText( sText, sAltText );
|
SetText( sText, sAltText );
|
||||||
|
|||||||
Reference in New Issue
Block a user