mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Added Alignment, Defaultable and Scriptable types, needed some reflection tweaks for the last two.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@17 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <util/io/get_member.hpp>
|
||||
#include <util/vector2d.hpp>
|
||||
#include <script/value.hpp>
|
||||
#include <script/script.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : GetMember
|
||||
|
||||
@@ -16,12 +17,16 @@ GetMember::GetMember(const String& name)
|
||||
: targetName(name)
|
||||
{}
|
||||
|
||||
void GetMember::store(const String& v) { value = toScript(v); }
|
||||
void GetMember::store(const int v) { value = toScript(v); }
|
||||
void GetMember::store(const unsigned int v) { value = toScript((int)v); }
|
||||
void GetMember::store(const double v) { value = toScript(v); }
|
||||
void GetMember::store(const bool v) { value = toScript(v); }
|
||||
template <> void GetMember::store(const String& v) { value = toScript(v); }
|
||||
//template <> void GetMember::store(const Char* const& v) { value = toScript(v); }
|
||||
template <> void GetMember::store(const int& v) { value = toScript(v); }
|
||||
template <> void GetMember::store(const unsigned int& v) { value = toScript((int)v); }
|
||||
template <> void GetMember::store(const double& v) { value = toScript(v); }
|
||||
template <> void GetMember::store(const bool& v) { value = toScript(v); }
|
||||
|
||||
void GetMember::store(const Vector2D& v) {
|
||||
template <> void GetMember::store(const ScriptValueP& v) { value = v; }
|
||||
template <> void GetMember::store(const ScriptP& v) { value = v; }
|
||||
|
||||
template <> void GetMember::store(const Vector2D& v) {
|
||||
value = toScript(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user