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:
wagic.jeck
2010-08-28 10:51:38 +00:00
parent 3ad28096b1
commit 8114944db9
46 changed files with 415 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
class WStyle{
public:
friend class StyleManager;
string stylized(string filename);
protected:
map<string,string> mapping;
};
class WStyleRule{
public:
string filter; //The condition
string style; //The style to use.
};
class MTGDeck;
class StyleManager{
public:
friend class OptionThemeStyle;
friend class OptionTheme;
StyleManager();
~StyleManager();
void determineActive(MTGDeck * p1, MTGDeck * p2);
WStyle * get();
protected:
int topRule; int topSize;
int playerSrc;
void loadRules();
void killRules();
vector<WStyleRule*> rules;
string activeStyle;
map<string,WStyle*> styles;
};