Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError.

This commit is contained in:
Kyzentun
2014-07-07 00:39:27 -06:00
parent ff1392cdba
commit 026f968fa4
31 changed files with 119 additions and 118 deletions
+4 -4
View File
@@ -328,7 +328,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
switch( ft )
{
default:
LOG->Warn( "CreateBackground() Unknown file type '%s'", vsResolved[0].c_str() );
LuaHelpers::ReportScriptErrorFmt( "CreateBackground() Unknown file type '%s'", vsResolved[0].c_str() );
// fall through
case FT_Bitmap:
case FT_Sprite:
@@ -364,12 +364,12 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
BackgroundUtil::GetBackgroundEffects( sEffect, vsPaths, vsThrowAway );
if( vsPaths.empty() )
{
LOG->Warn( "BackgroundEffect '%s' is missing.",sEffect.c_str() );
LuaHelpers::ReportScriptErrorFmt( "BackgroundEffect '%s' is missing.",sEffect.c_str() );
sEffect = SBE_Centered;
}
else if( vsPaths.size() > 1 )
{
LOG->Warn( "BackgroundEffect '%s' has more than one match.",sEffect.c_str() );
LuaHelpers::ReportScriptErrorFmt( "BackgroundEffect '%s' has more than one match.",sEffect.c_str() );
sEffect = SBE_Centered;
}
else
@@ -744,7 +744,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
XNode *pNode = change.m_def.CreateNode();
RString xml = XmlFileUtil::GetXML( pNode );
Trim( xml );
LOG->Warn( "Tried to switch to a background that was never loaded:\n%s", xml.c_str() );
LuaHelpers::ReportScriptErrorFmt( "Tried to switch to a background that was never loaded:\n%s", xml.c_str() );
SAFE_DELETE( pNode );
return;
}