#include "stdafx.h" /* ----------------------------------------------------------------------------- Class: ThemeManager Desc: See header. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "ThemeManager.h" #include "RageLog.h" #include "PrefsManager.h" #include "RageException.h" ThemeManager* THEME = NULL; // global object accessable from anywhere in the program const CString BASE_THEME_NAME = "default"; const CString THEMES_DIR = "Themes\\"; ThemeManager::ThemeManager() { m_sCurThemeName = BASE_THEME_NAME; // Use te base theme for now. It's up to PrefsManager to change this. CStringArray arrayThemeNames; GetThemeNames( arrayThemeNames ); #ifdef _DEBUG for( int i=0; i=0; i-- ) if( 0 == stricmp( AddTo[i], "cvs" ) ) AddTo.RemoveAt(i); } bool ThemeManager::DoesThemeExist( CString sThemeName ) { CStringArray asThemeNames; GetThemeNames( asThemeNames ); for( int i=0; i 0 ) return asPossibleElementFilePaths[0]; else throw RageException( "Theme element '%s' could not be found in '%s' or '%s'.", sAssetPrefix, GetThemeDirFromName(m_sCurThemeName), GetThemeDirFromName(BASE_THEME_NAME) ); return ""; }