mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Dependencies on stylesheet are marked, and updated when the stylesheet changes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1087 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -58,6 +58,7 @@ class Game : public Packaged {
|
||||
|
||||
Dependencies dependent_scripts_cards; ///< scripts that depend on the card list
|
||||
Dependencies dependent_scripts_keywords; ///< scripts that depend on the keywords
|
||||
Dependencies dependent_scripts_stylesheet; ///< scripts that depend on the card's stylesheet
|
||||
bool dependencies_initialized; ///< are the script dependencies comming from this game all initialized?
|
||||
|
||||
/// Loads the game with a particular name, for example "magic"
|
||||
|
||||
@@ -88,6 +88,11 @@ StyleP StyleSheet::styleFor(const FieldP& field) {
|
||||
}
|
||||
|
||||
|
||||
void mark_dependency_value(const StyleSheet& stylesheet, const Dependency& dep) {
|
||||
stylesheet.game->dependent_scripts_stylesheet.add(dep);
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_REFLECTION(StyleSheet) {
|
||||
// < 0.3.0 didn't use card_ prefix
|
||||
REFLECT_ALIAS(300, "width", "card width");
|
||||
|
||||
@@ -77,5 +77,7 @@ inline String type_name(const StyleSheet&) {
|
||||
return _TYPE_("stylesheet");
|
||||
}
|
||||
|
||||
void mark_dependency_value(const StyleSheet& value, const Dependency& dep);
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user