Skip to content

Commit 887e711

Browse files
author
Antonino Tramontana
committed
Added note block standard
1 parent e48de79 commit 887e711

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/components/Activity.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,31 @@ export default {
17111711
return code;
17121712
};
17131713
1714+
Blockly.Blocks['coderbot_music_note_std'] = {
1715+
init: function() {
1716+
this.appendDummyInput()
1717+
.appendField(new Blockly.FieldImage("/static/images/blocks/musical_note.png", 30, 30, { alt: "note", flipRtl: "FALSE" }))
1718+
.appendField("nota")
1719+
.appendField(new Blockly.FieldDropdown([["DO ","C2"], ["RE ","D2"], ["MI ","E2"], ["FA ","F2"], ["FA # ","F#2"], ["SOL ","G2"], ["LA ","A2"], ["SI b ","Bb2"], ["SI ","B2"], ["DO+ ","C3"], ["RE+ ","D3"], ["PAUSA","PAUSE"]]), "note");
1720+
this.appendDummyInput()
1721+
.appendField("strumento")
1722+
.appendField(new Blockly.FieldDropdown([["piano","piano"], ["chitarra","guitar"], ["flauto","flute"]]), "instrument");
1723+
this.appendValueInput("duration")
1724+
.setCheck("Number")
1725+
.setAlign(Blockly.ALIGN_CENTRE)
1726+
.appendField("durata");
1727+
this.appendDummyInput()
1728+
.appendField("secondi");
1729+
this.setInputsInline(true);
1730+
this.setPreviousStatement(true, null);
1731+
this.setNextStatement(true, null);
1732+
this.setColour(345);
1733+
this.setTooltip("");
1734+
this.setHelpUrl("");
1735+
}
1736+
};
1737+
1738+
17141739
Blockly.Python['coderbot_audio_listen'] = function(block) {
17151740
// Boolean values true and false.
17161741
var model = block.getFieldValue('MODEL');

0 commit comments

Comments
 (0)