mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Moved resources to better filenames;
Updated HoverButton, now an actual custom control, added focused and down states; Added Help->Website git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@196 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -339,6 +339,12 @@ SCRIPT_FUNCTION(contains) {
|
||||
SCRIPT_RETURN(input.find(match) != String::npos);
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(format) {
|
||||
SCRIPT_PARAM(String, format);
|
||||
SCRIPT_PARAM(String, input);
|
||||
SCRIPT_RETURN(format_string(_("%") + replace_all(format, _("%"), _("")), input));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Tagged stuff
|
||||
|
||||
String replace_tag_contents(String input, const String& tag, const ScriptValueP& contents, Context& ctx) {
|
||||
@@ -582,6 +588,7 @@ void init_script_functions(Context& ctx) {
|
||||
ctx.setVariable(_("to title"), script_to_title);
|
||||
ctx.setVariable(_("substring"), script_substring);
|
||||
ctx.setVariable(_("contains"), script_contains);
|
||||
ctx.setVariable(_("format"), script_format);
|
||||
ctx.setVariable(_("tag contents"), script_tag_contents);
|
||||
ctx.setVariable(_("remove tag"), script_tag_remove);
|
||||
ctx.setVariable(_("tag contents rule"), script_tag_contents_rule);
|
||||
|
||||
@@ -292,7 +292,7 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec);
|
||||
|
||||
/// Parse an expression, possibly with operators applied. Optionally adds an instruction at the end.
|
||||
/** @param input Read tokens from the input
|
||||
* @param script Add resulting instructions to the script
|
||||
* @param script Add resulting instructions to the script
|
||||
* @param minPrec Minimum precedence level for operators
|
||||
* @param closeWith Add this instruction at the end
|
||||
* @param closeWithData Data for the instruction at the end
|
||||
|
||||
Reference in New Issue
Block a user