separate short_name for packages, moved full_name,short_name and icon_filename to Packaged

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@173 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-25 14:19:36 +00:00
parent f7d12a4114
commit 031266c71b
12 changed files with 41 additions and 63 deletions
+1 -16
View File
@@ -36,15 +36,6 @@ String StyleSheet::stylesheetName() const {
String StyleSheet::typeNameStatic() { return _("style"); }
String StyleSheet::typeName() const { return _("style"); }
String StyleSheet::fullName() const { return full_name; }
InputStreamP StyleSheet::openIconFile() {
if (!icon_filename.empty()) {
return openIn(icon_filename);
} else {
return game->openIconFile(); // use game icon by default
}
}
StyleP StyleSheet::styleFor(const FieldP& field) {
if (card_style.containsKey(field)) {
return card_style[field];
@@ -70,8 +61,7 @@ IMPLEMENT_REFLECTION(StyleSheet) {
tag.addAlias(300, _("extra style"),_("styling style"));
REFLECT(game);
REFLECT(full_name);
REFLECT_N("icon", icon_filename);
REFLECT_BASE(Packaged);
REFLECT(init_script);
REFLECT(card_width);
REFLECT(card_height);
@@ -90,11 +80,6 @@ IMPLEMENT_REFLECTION(StyleSheet) {
REFLECT(styling_style);
}
void StyleSheet::validate(Version) {
// a default for the full name
if (full_name.empty()) full_name = name();
}
// special behaviour of reading/writing StyleSheetPs: only read/write the name