mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
A bit of refactoring:
- common code of ChoiceValueViewer and MultipleChoiceValueViewer put into functions - RotatedDC can now draw text with shadow. - DECLARE_STYLE_TYPE macro and friends do slightly more. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@788 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -42,9 +42,6 @@ class ChoiceField : public Field {
|
||||
map<String,Color> choice_colors_cardlist; ///< Colors for the various choices, for in the card list
|
||||
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
|
||||
@@ -166,9 +163,6 @@ class ChoiceStyle : public Style {
|
||||
virtual int update(Context&);
|
||||
virtual void initDependencies(Context&, const Dependency&) const;
|
||||
virtual void invalidate();
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : ChoiceValue
|
||||
@@ -181,17 +175,11 @@ class ChoiceValue : public Value {
|
||||
an explicit initial value
|
||||
*/
|
||||
ChoiceValue(const ChoiceFieldP& field, bool initial_first_choice = true);
|
||||
DECLARE_HAS_FIELD(Choice)
|
||||
DECLARE_VALUE_TYPE(Choice, Defaultable<String>);
|
||||
|
||||
typedef Defaultable<String> ValueType;
|
||||
ValueType value; /// The name of the selected choice
|
||||
|
||||
virtual ValueP clone() const;
|
||||
virtual String toString() const;
|
||||
virtual bool update(Context&);
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user