mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added placeholder ValueEditors for all field types
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@75 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+2
-2
@@ -95,7 +95,7 @@ class Style {
|
||||
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP) = 0;
|
||||
/// Make an editor object for values using this style
|
||||
/** thisP is a smart pointer to this */
|
||||
virtual ValueEditorP makeEditor(DataEditor& parent, const StyleP& thisP) = 0;
|
||||
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP) = 0;
|
||||
|
||||
/// Update scripted values of this style, return true if anything has changed
|
||||
virtual bool update(Context&);
|
||||
@@ -157,7 +157,7 @@ template <> ValueP read_new<Value>(Reader&);
|
||||
#define DECLARE_STYLE_TYPE(Type) \
|
||||
DECLARE_HAS_FIELD(Type) \
|
||||
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP); \
|
||||
virtual ValueEditorP makeEditor(DataEditor& parent, const StyleP& thisP)
|
||||
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP)
|
||||
|
||||
// implement field() which returns a field with the right (derived) type
|
||||
#define DECLARE_HAS_FIELD(Type) \
|
||||
|
||||
@@ -36,7 +36,7 @@ class BooleanField : public ChoiceField {
|
||||
class BooleanStyle : public ChoiceStyle {
|
||||
public:
|
||||
inline BooleanStyle(const ChoiceFieldP& field) : ChoiceStyle(field) {}
|
||||
DECLARE_STYLE_TYPE(Boolean);
|
||||
DECLARE_HAS_FIELD(Boolean); // not DECLARE_STYLE_TYPE, because we use a normal ChoiceValueViewer/Editor
|
||||
|
||||
// no extra data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user