mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Movement of objects with the arrow keys in symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@527 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <gfx/bezier.hpp>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||
DECLARE_TYPEOF_COLLECTION(SymbolPartP);
|
||||
|
||||
// ----------------------------------------------------------------------------- : ControlPoint
|
||||
|
||||
@@ -108,6 +109,7 @@ SymbolPartP read_new<SymbolPart>(Reader& reader) {
|
||||
reader.handle(_("type"), type);
|
||||
if (type == _("shape") || type.empty()) return new_intrusive<SymbolShape>();
|
||||
else if (type == _("symmetry")) return new_intrusive<SymbolSymmetry>();
|
||||
else if (type == _("group")) return new_intrusive<SymbolGroup>();
|
||||
else {
|
||||
throw ParseError(_("Unsupported symbol part type: '") + type + _("'"));
|
||||
}
|
||||
@@ -218,6 +220,26 @@ IMPLEMENT_REFLECTION(SymbolSymmetry) {
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolGroup
|
||||
|
||||
String SymbolGroup::typeName() const {
|
||||
return _("group");
|
||||
}
|
||||
|
||||
SymbolPartP SymbolGroup::clone() const {
|
||||
SymbolGroupP part(new SymbolGroup(*this));
|
||||
// also clone the parts inside
|
||||
FOR_EACH(p, part->parts) {
|
||||
p = p->clone();
|
||||
}
|
||||
return part;
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(SymbolGroup) {
|
||||
REFLECT_BASE(SymbolPart);
|
||||
REFLECT(parts);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Symbol
|
||||
|
||||
IMPLEMENT_REFLECTION(Symbol) {
|
||||
|
||||
Reference in New Issue
Block a user