mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Automatic conversion of keyword parameter to number;
Made alignment scriptable git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@386 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include <script/script.hpp>
|
||||
#include <script/value.hpp>
|
||||
|
||||
Alignment from_string(const String&);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Store
|
||||
|
||||
void store(const ScriptValueP& val, String& var) { var = val->toString(); }
|
||||
@@ -21,6 +23,7 @@ void store(const ScriptValueP& val, bool& var) { var = static_cas
|
||||
void store(const ScriptValueP& val, Color& var) { var = *val; }
|
||||
void store(const ScriptValueP& val, Defaultable<String>& var) { var.assign(*val); }
|
||||
void store(const ScriptValueP& val, Defaultable<Color>& var) { var.assign(*val); }
|
||||
void store(const ScriptValueP& val, Alignment& var) { var = from_string(val->toString()); }
|
||||
|
||||
// ----------------------------------------------------------------------------- : OptionalScript
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <util/reflect.hpp>
|
||||
#include <util/defaultable.hpp>
|
||||
#include <util/alignment.hpp>
|
||||
#include <script/script.hpp>
|
||||
#include <script/context.hpp>
|
||||
#include <script/parser.hpp>
|
||||
@@ -29,6 +30,7 @@ void store(const ScriptValueP& val, bool& var);
|
||||
void store(const ScriptValueP& val, Color& var);
|
||||
void store(const ScriptValueP& val, Defaultable<String>& var);
|
||||
void store(const ScriptValueP& val, Defaultable<Color>& var);
|
||||
void store(const ScriptValueP& val, Alignment& var);
|
||||
|
||||
// ----------------------------------------------------------------------------- : OptionalScript
|
||||
|
||||
|
||||
Reference in New Issue
Block a user