mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
implemented all field types
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@29 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -9,5 +9,40 @@
|
||||
#include <data/field/boolean.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : BooleanField
|
||||
|
||||
BooleanField::BooleanField() {
|
||||
// choices->choices.push_back(new_shared1<Choice>(_("yes")));
|
||||
// choices->choices.push_back(new_shared1<Choice>(_("no")));
|
||||
// choices->initIds();
|
||||
}
|
||||
|
||||
StyleP BooleanField::newStyle(const FieldP& thisP) const {
|
||||
return new_shared<BooleanStyle>();
|
||||
}
|
||||
|
||||
ValueP BooleanField::newValue(const FieldP& thisP) const {
|
||||
return new_shared<BooleanValue>();
|
||||
}
|
||||
|
||||
String BooleanField::typeName() const {
|
||||
return _("boolean");
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(BooleanField) {
|
||||
REFLECT_BASE(Field); // NOTE: don't reflect as a ChoiceField
|
||||
REFLECT(script);
|
||||
REFLECT_N("default", default_script);
|
||||
REFLECT(initial);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : BooleanStyle
|
||||
|
||||
IMPLEMENT_REFLECTION(BooleanStyle) {
|
||||
REFLECT_BASE(ChoiceStyle);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : BooleanValue
|
||||
|
||||
IMPLEMENT_REFLECTION_NAMELESS(BooleanValue) {
|
||||
REFLECT_BASE(ChoiceValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user