コード例 #1
0
MMSTheme *MMSThemeManager::loadLocalTheme(string path, string themeName) {

	// check if initialized
	INITCHECK;

	// check if theme is already loaded
	for(vector<MMSTheme*>::const_iterator i = this->localThemes.begin(); i != this->localThemes.end(); ++i) {
        if(((*i)->getPath() == path) && ((*i)->getThemeName() == themeName)) {
            // already loaded
        	return *i;
        }
    }

	// load new theme
	MMSConfigData config;
	MMSTheme *theme = new MMSTheme(config.getInitialLoad(), config.getDebugFrames());
	loadLocalTheme(theme, path, themeName);

	// add theme to list
	this->localThemes.push_back(theme);

    return theme;
}