Skip to content

Commit 7ddc2cc

Browse files
author
Antonino Tramontana
committed
added pause block
1 parent e48de79 commit 7ddc2cc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/components/Activity.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,25 @@ export default {
17111711
return code;
17121712
};
17131713
1714+
Blockly.Blocks['coderbot_music_pause_std'] = {
1715+
init: function() {
1716+
this.appendDummyInput()
1717+
.appendField(new Blockly.FieldImage("/static/images/blocks/pause_symbol.png", 30, 30, { alt: "*", flipRtl: "FALSE" }))
1718+
.appendField("Pausa");
1719+
this.setPreviousStatement(true, null);
1720+
this.setNextStatement(true, null);
1721+
this.setColour(345);
1722+
this.setTooltip("");
1723+
this.setHelpUrl("");
1724+
}
1725+
};
1726+
1727+
Blockly.Python['coderbot_music_pause_std'] = function(block) {
1728+
var value_duration = 1
1729+
var code = 'get_music().play_pause('+value_duration+')\n';
1730+
return code;
1731+
};
1732+
17141733
Blockly.Python['coderbot_audio_listen'] = function(block) {
17151734
// Boolean values true and false.
17161735
var model = block.getFieldValue('MODEL');

0 commit comments

Comments
 (0)