Added "Clear Window" block

This commit is contained in:
Brendan Robert 2014-07-06 10:09:06 -05:00
parent e3f94a7a9e
commit dd423e73e4
2 changed files with 13 additions and 0 deletions

View File

@ -52,6 +52,7 @@
</category>
<category name="Text">
<block type="text_window"></block>
<block type="text_clear_window"></block>
<block type="text_moveto"></block>
<block type="text_print"></block>
<block type="text_println"></block>

View File

@ -161,6 +161,18 @@ if (typeof Mythos === "undefined") {
this.setTooltip('Print text and leave cursor at end of last printed character');
}
};
Blockly.Blocks['text_clear_window'] = {
init: function() {
this.setHelpUrl('https://docs.google.com/document/d/1VXbiY4G533-cokjQevZFhwvqMMCL--17ziMAoFoeJ5M');
this.setColour(54);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.appendDummyInput()
.appendField("Clear Window");
this.setOutput(false);
this.setTooltip('Clears text window and moves cursor to the top');
}
};
Blockly.Blocks['text_scroll'] = {
init: function() {
this.setHelpUrl('https://docs.google.com/document/d/1VXbiY4G533-cokjQevZFhwvqMMCL--17ziMAoFoeJ5M');