mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
added FieldP to values and styles, implemented reflection for IndexMap
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@36 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -17,13 +17,7 @@ ChoiceField::ChoiceField()
|
||||
, default_name(_("Default"))
|
||||
{}
|
||||
|
||||
StyleP ChoiceField::newStyle(const FieldP& thisP) const {
|
||||
return new_shared<ChoiceStyle>();
|
||||
}
|
||||
|
||||
ValueP ChoiceField::newValue(const FieldP& thisP) const {
|
||||
return new_shared<ChoiceValue>();
|
||||
}
|
||||
FIELD_TYPE(Choice)
|
||||
|
||||
String ChoiceField::typeName() const {
|
||||
return _("choice");
|
||||
@@ -153,8 +147,13 @@ template <> void GetMember::handle(const ChoiceField::Choice& c) {
|
||||
|
||||
// ----------------------------------------------------------------------------- : ChoiceStyle
|
||||
|
||||
ChoiceStyle::ChoiceStyle()
|
||||
|
||||
ChoiceStyle::ChoiceStyle(const ChoiceFieldP& field)
|
||||
: Style(field)
|
||||
, popup_style(POPUP_DROPDOWN)
|
||||
, render_style(RENDER_TEXT)
|
||||
, combine(COMBINE_NORMAL)
|
||||
, alignment(ALIGN_STRETCH)
|
||||
, colors_card_list(false)
|
||||
{}
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(ChoicePopupStyle) {
|
||||
@@ -191,7 +190,6 @@ String ChoiceValue::toString() const {
|
||||
return value();
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_REFLECTION_NAMELESS(ChoiceValue) {
|
||||
REFLECT_NAMELESS(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user