mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Use LocalFileName class for file names inside a package.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <data/field.hpp>
|
||||
#include <script/scriptable.hpp>
|
||||
#include <script/image.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : ImageField
|
||||
|
||||
@@ -45,7 +46,7 @@ class ImageStyle : public Style {
|
||||
class ImageValue : public Value {
|
||||
public:
|
||||
inline ImageValue(const ImageFieldP& field) : Value(field) {}
|
||||
DECLARE_VALUE_TYPE(Image, FileName);
|
||||
DECLARE_VALUE_TYPE(Image, LocalFileName);
|
||||
|
||||
ValueType filename; ///< Filename of the image (in the current package), or ""
|
||||
Age last_update; ///< When was the image last changed?
|
||||
|
||||
@@ -51,6 +51,8 @@ String SymbolValue::toString() const {
|
||||
return filename.empty() ? wxEmptyString : _("<symbol>");
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_NAMELESS(SymbolValue) {
|
||||
IMPLEMENT_REFLECTION_NO_GET_MEMBER(SymbolValue) {
|
||||
if (fieldP->save_value || !handler.isWriting) REFLECT_NAMELESS(filename);
|
||||
}
|
||||
void SymbolValue::reflect(GetMember& handler) {}
|
||||
void SymbolValue::reflect(GetDefaultMember& handler) {}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <data/field.hpp>
|
||||
#include <script/scriptable.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
|
||||
DECLARE_POINTER_TYPE(SymbolFilter);
|
||||
DECLARE_POINTER_TYPE(SymbolVariation);
|
||||
@@ -65,7 +66,7 @@ class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
|
||||
class SymbolValue : public Value {
|
||||
public:
|
||||
inline SymbolValue(const SymbolFieldP& field) : Value(field) {}
|
||||
DECLARE_VALUE_TYPE(Symbol, FileName);
|
||||
DECLARE_VALUE_TYPE(Symbol, LocalFileName);
|
||||
|
||||
ValueType filename; ///< Filename of the symbol (in the current package)
|
||||
Age last_update; ///< When was the symbol last changed?
|
||||
|
||||
Reference in New Issue
Block a user