Added Blockly event for switching to different map.

This commit is contained in:
Martin Haye 2014-07-06 08:20:23 -07:00
parent ac2e03e35d
commit 8dd017de6e
2 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,7 @@
<block type="logic_cointoss"></block>
</category>
<category name="Events">
<block type="events_setmap"></block>
</category>
<category name="Text">
<block type="text_window"></block>

View File

@ -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);