From 8dd017de6e6e2ff4a84b67fe1cb0cbb8b886fcf6 Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Sun, 6 Jul 2014 08:20:23 -0700 Subject: [PATCH] Added Blockly event for switching to different map. --- .../resources/mythos/mythos-editor/html/editor.html | 1 + .../mythos/mythos-editor/js/mythos_uncompressed.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/OutlawEditor/src/main/resources/mythos/mythos-editor/html/editor.html b/OutlawEditor/src/main/resources/mythos/mythos-editor/html/editor.html index 266aa92d..7f3be4a1 100644 --- a/OutlawEditor/src/main/resources/mythos/mythos-editor/html/editor.html +++ b/OutlawEditor/src/main/resources/mythos/mythos-editor/html/editor.html @@ -49,6 +49,7 @@ + diff --git a/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js b/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js index ce5de0f3..a54ffbe6 100644 --- a/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js +++ b/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js @@ -84,6 +84,18 @@ if (typeof Mythos === "undefined") { .appendField("Coin toss"); } }; + Blockly.Blocks['events_setmap'] = { + init: function() { + this.setHelpUrl(Mythos.helpUrl); + this.setColour(54); + this.setPreviousStatement(true); + this.setNextStatement(false); + this.appendValueInput("VALUE") + .appendField("Set map"); + this.setOutput(false); + this.setTooltip('Switch to a different map (by name)'); + } + }; Blockly.Blocks['text_window'] = { init: function() { this.setHelpUrl(Mythos.helpUrl);