mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Cleaned up Set::Styling/Card::Styling by spliting that functionality into a 'DelayedIndexMaps' class;
Added 'right' and 'bottom' properties to style as an alternative way of specifying width/height; Added content_width, content_height and content_lines properties that give feedback on text rendering; Always show warnings when showing errors and vice-versa, this prevents script errors from appearing before the reader/parse error that caused them; Finally some preliminairy work on export templates git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@428 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -9,12 +9,22 @@
|
||||
#include <script/functions/functions.hpp>
|
||||
#include <script/functions/util.hpp>
|
||||
#include <util/tagged_string.hpp>
|
||||
#include <util/error.hpp>
|
||||
#include <data/set.hpp>
|
||||
#include <data/card.hpp>
|
||||
#include <data/game.hpp>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(pair<String COMMA ScriptValueP>);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Debugging
|
||||
|
||||
SCRIPT_FUNCTION(trace) {
|
||||
SCRIPT_PARAM(String, input);
|
||||
//handle_warning(_("Trace:\t") + input, false);
|
||||
wxLogDebug(_("Trace:\t") + input);
|
||||
SCRIPT_RETURN(input);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : String stuff
|
||||
|
||||
// convert a string to upper case
|
||||
@@ -607,6 +617,8 @@ SCRIPT_FUNCTION(sort) {
|
||||
// ----------------------------------------------------------------------------- : Init
|
||||
|
||||
void init_script_basic_functions(Context& ctx) {
|
||||
// debugging
|
||||
ctx.setVariable(_("trace"), script_trace);
|
||||
// string
|
||||
ctx.setVariable(_("to upper"), script_to_upper);
|
||||
ctx.setVariable(_("to lower"), script_to_lower);
|
||||
|
||||
Reference in New Issue
Block a user