mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added dummy keyword panel; fixed directory finding; added more controls to style panel
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@86 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+25
-1
@@ -14,7 +14,7 @@ IMPLEMENT_REFLECTION(KeywordParam) {
|
||||
REFLECT(name);
|
||||
REFLECT(description);
|
||||
REFLECT(match);
|
||||
REFLECT(in_reminder);
|
||||
REFLECT(script);
|
||||
}
|
||||
IMPLEMENT_REFLECTION(KeywordMode) {
|
||||
REFLECT(name);
|
||||
@@ -25,8 +25,32 @@ IMPLEMENT_REFLECTION(KeywordExpansion) {
|
||||
REFLECT(after);
|
||||
REFLECT(reminder);
|
||||
}
|
||||
|
||||
// backwards compatability
|
||||
template <typename T> void read_compat(T&, const Keyword*) {}
|
||||
void read_compat(Reader& tag, Keyword* k) {
|
||||
String separator, parameter, reminder;
|
||||
REFLECT(separator);
|
||||
REFLECT(parameter);
|
||||
REFLECT(reminder);
|
||||
if (!separator.empty() || !parameter.empty() || !reminder.empty()) {
|
||||
// old style keyword declaration, no separate expansion
|
||||
KeywordExpansionP e(new KeywordExpansion);
|
||||
size_t start = separator.find_first_of('[');
|
||||
size_t end = separator.find_first_of(']');
|
||||
if (start != String.npos && end != String.npos) {
|
||||
e->after += separator.substr(start + 1, end - start - 1);
|
||||
}
|
||||
if (!parameter.empty()) {
|
||||
e->after += _("<param>") + parameter + _("</param>");
|
||||
}
|
||||
e->reminder.set(reminder);
|
||||
}
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(Keyword) {
|
||||
REFLECT(keyword);
|
||||
read_compat(tag, this);
|
||||
REFLECT(expansions);
|
||||
REFLECT(rules);
|
||||
REFLECT(mode);
|
||||
|
||||
Reference in New Issue
Block a user