mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Change tabs to two spaces.
This commit is contained in:
+10
-10
@@ -15,38 +15,38 @@
|
||||
IMPLEMENT_FIELD_TYPE(Image, "image");
|
||||
|
||||
IMPLEMENT_REFLECTION(ImageField) {
|
||||
REFLECT_BASE(Field);
|
||||
REFLECT_BASE(Field);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------- : ImageStyle
|
||||
|
||||
IMPLEMENT_REFLECTION(ImageStyle) {
|
||||
REFLECT_BASE(Style);
|
||||
REFLECT_N("default", default_image);
|
||||
REFLECT_BASE(Style);
|
||||
REFLECT_N("default", default_image);
|
||||
}
|
||||
|
||||
int ImageStyle::update(Context& ctx) {
|
||||
return Style ::update(ctx)
|
||||
| default_image.update(ctx) * CHANGE_DEFAULT;
|
||||
return Style ::update(ctx)
|
||||
| default_image.update(ctx) * CHANGE_DEFAULT;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : ImageValue
|
||||
|
||||
String ImageValue::toString() const {
|
||||
return filename.empty() ? wxEmptyString : _("<image>");
|
||||
return filename.empty() ? wxEmptyString : _("<image>");
|
||||
}
|
||||
|
||||
// custom reflection: convert to ScriptImageP for scripting
|
||||
|
||||
void ImageValue::reflect(Reader& tag) {
|
||||
tag.handle(filename);
|
||||
tag.handle(filename);
|
||||
}
|
||||
void ImageValue::reflect(Writer& tag) {
|
||||
if (fieldP->save_value) tag.handle(filename);
|
||||
if (fieldP->save_value) tag.handle(filename);
|
||||
}
|
||||
void ImageValue::reflect(GetMember& tag) {}
|
||||
void ImageValue::reflect(GetDefaultMember& tag) {
|
||||
// convert to ScriptImageP for scripting
|
||||
tag.handle( (ScriptValueP)intrusive(new ImageValueToImage(filename, last_update)) );
|
||||
// convert to ScriptImageP for scripting
|
||||
tag.handle( (ScriptValueP)intrusive(new ImageValueToImage(filename, last_update)) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user