mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Moved spec_sort to separate file, added more advanced options;
Split 'sort' script function into 'sort_text' and 'sort_list'; Double clicking card in stats panel switches to cards panel git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@587 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -92,8 +92,7 @@
|
||||
SCRIPT_OPTIONAL_PARAM_N(Type, _(#name), name)
|
||||
/// Retrieve a named optional parameter
|
||||
#define SCRIPT_OPTIONAL_PARAM_N(Type, str, name) \
|
||||
ScriptValueP name##_ = ctx.getVariableOpt(str); \
|
||||
Type name = name##_ ? from_script<Type>(name##_) : Type(); \
|
||||
SCRIPT_OPTIONAL_PARAM_N_(Type, str, name) \
|
||||
if (name##_)
|
||||
|
||||
/// Retrieve an optional parameter, can't be used as an if statement
|
||||
@@ -102,7 +101,8 @@
|
||||
/// Retrieve a named optional parameter, can't be used as an if statement
|
||||
#define SCRIPT_OPTIONAL_PARAM_N_(Type, str, name) \
|
||||
ScriptValueP name##_ = ctx.getVariableOpt(str); \
|
||||
Type name = name##_ ? from_script<Type>(name##_) : Type();
|
||||
Type name = name##_ && name##_ != script_nil \
|
||||
? from_script<Type>(name##_) : Type();
|
||||
|
||||
/// Retrieve an optional parameter with a default value
|
||||
#define SCRIPT_PARAM_DEFAULT(Type, name, def) \
|
||||
|
||||
Reference in New Issue
Block a user