Changed many parts of GameCommand to improve error reporting. Fixed GameCommand setpref to not set when loading the command. Minor fix to ScreenOptionsExample.ini to explain that SongInCurrentSongGroup is unusable. CommonMetrics, CourseContentsList, HoldJudgent, OptionRowHandler all have minor changes to fix crashes on malformed theme data.

This commit is contained in:
Kyzentun
2014-07-14 15:41:04 -06:00
parent fb1a251b7a
commit 6cf23c4dc3
10 changed files with 147 additions and 89 deletions
+11 -8
View File
@@ -126,18 +126,21 @@ void BitmapText::LoadFromNode( const XNode* pNode )
ThemeManager::EvaluateString( sAltText );
RString sFont;
if( !ActorUtil::GetAttrPath(pNode, "Font", sFont) &&
!ActorUtil::GetAttrPath(pNode, "File", sFont) )
// The short circuiting loading condition that was here before wasn't short circuiting correctly on all platforms.
if(!ActorUtil::GetAttrPath(pNode, "Font", sFont))
{
if( !pNode->GetAttrValue("Font", sFont) &&
!pNode->GetAttrValue("File", sFont) ) // accept "File" for backward compatibility
if(!ActorUtil::GetAttrPath(pNode, "File", sFont))
{
LuaHelpers::ReportScriptErrorFmt( "%s: BitmapText: Font or File attribute not found",
ActorUtil::GetWhere(pNode).c_str() );
sFont = "Common Normal";
if( !pNode->GetAttrValue("Font", sFont) &&
!pNode->GetAttrValue("File", sFont) ) // accept "File" for backward compatibility
{
LuaHelpers::ReportScriptErrorFmt( "%s: BitmapText: Font or File attribute not found",
ActorUtil::GetWhere(pNode).c_str() );
sFont = "Common Normal";
}
}
sFont = THEME->GetPathF( "", sFont );
}
sFont = THEME->GetPathF( "", sFont );
LoadFromFont( sFont );