Jeck - Added theme substyles, which are chosen dynamically based on the player's deck composition. Also added lazy unit test for booster packs, though there should be a better way to framework this.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <JFileSystem.h>
|
||||
#include <assert.h>
|
||||
#include "../include/WResourceManager.h"
|
||||
#include "../include/StyleManager.h"
|
||||
#if defined (WIN32)
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -515,6 +516,16 @@ string WResourceManager::graphicsFile(const string filename){
|
||||
//Check the theme folder.
|
||||
string theme = options[Options::ACTIVE_THEME].str;
|
||||
|
||||
//Check for a theme style renaming:
|
||||
if(filename != "style.txt"){
|
||||
WStyle * ws = options.getStyle();
|
||||
if(ws){
|
||||
sprintf(buf,"themes/%s/%s",theme.c_str(),ws->stylized(filename).c_str());
|
||||
if(fileOK(buf,true))
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
if(theme != "" && theme != "Default"){
|
||||
sprintf(buf,"themes/%s/%s",theme.c_str(),filename.c_str());
|
||||
if(fileOK(buf,true))
|
||||
|
||||
Reference in New Issue
Block a user