Missing theme elements is not longer fatal

This commit is contained in:
Chris Danford
2002-09-30 06:32:56 +00:00
parent 6a2fab84b4
commit ed6dc58f67
3 changed files with 23 additions and 6 deletions
+22 -6
View File
@@ -162,14 +162,30 @@ try_element_again:
if( asPossibleElementFilePaths.GetSize() == 0 )
{
#ifdef _DEBUG
if( IDRETRY == AfxMessageBox( ssprintf("The theme element %s/%s is missing. Correct this and click Retry, or Cancel to break.",sAssetCategory,sFileName), MB_RETRYCANCEL ) )
switch( AfxMessageBox( ssprintf("The theme element %s/%s is missing.",sAssetCategory,sFileName), MB_ABORTRETRYIGNORE ) )
{
case IDRETRY:
goto try_element_again;
break;
case IDABORT:
#endif
throw RageException( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
sAssetCategory,
sFileName,
GetThemeDirFromName(m_sCurThemeName),
GetThemeDirFromName(BASE_THEME_NAME) );
#ifdef _DEBUG
case IDIGNORE:
LOG->Warn(
"Theme element '%s/%s' could not be found in '%s' or '%s'.",
sAssetCategory,
sFileName,
GetThemeDirFromName(m_sCurThemeName),
GetThemeDirFromName(BASE_THEME_NAME) );
return GetPathTo( sAssetCategory, "_missing" );
break;
}
#endif
throw RageException( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
sAssetCategory,
sFileName,
GetThemeDirFromName(m_sCurThemeName),
GetThemeDirFromName(BASE_THEME_NAME) );
}
asPossibleElementFilePaths[0].MakeLower();
if( asPossibleElementFilePaths[0].GetLength() > 5 && asPossibleElementFilePaths[0].Right(5) == "redir" ) // this is a redirect file