allow loading alternate codes

This commit is contained in:
Glenn Maynard
2004-05-22 23:54:23 +00:00
parent 991c55a069
commit 15d04ec72c
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -176,13 +176,15 @@ bool CodeDetector::EnteredCode( GameController controller, Code code )
} }
void CodeDetector::RefreshCacheItems() void CodeDetector::RefreshCacheItems( CString sClass )
{ {
if( sClass == "" )
sClass = "CodeDetector";
for( int i=0; i<NUM_CODES; i++ ) for( int i=0; i<NUM_CODES; i++ )
{ {
CodeItem& item = g_CodeItems[i]; CodeItem& item = g_CodeItems[i];
const CString sCodeName = g_sCodeNames[i]; const CString sCodeName = g_sCodeNames[i];
const CString sButtonsNames = THEME->GetMetric("CodeDetector",sCodeName); const CString sButtonsNames = THEME->GetMetric(sClass,sCodeName);
item.Load( sButtonsNames ); item.Load( sButtonsNames );
} }
+1 -1
View File
@@ -80,7 +80,7 @@ public:
NUM_CODES // leave this at the end NUM_CODES // leave this at the end
}; };
static void RefreshCacheItems(); // call this before checking codes, but call infrequently static void RefreshCacheItems( CString sClass="" ); // call this before checking codes, but call infrequently
static bool EnteredEasierDifficulty( GameController controller ); static bool EnteredEasierDifficulty( GameController controller );
static bool EnteredHarderDifficulty( GameController controller ); static bool EnteredHarderDifficulty( GameController controller );
static bool EnteredNextSort( GameController controller ); static bool EnteredNextSort( GameController controller );