Skip to content

Commit e48de79

Browse files
author
Antonino Tramontana
committed
modified Activity.vue
1 parent 6f791bb commit e48de79

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/components/Activity.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ export default {
16731673
.appendField(new Blockly.FieldImage("/static/images/blocks/musical_note.png", 30, 30, { alt: "note", flipRtl: "FALSE" }))
16741674
.appendField("NOTA ")
16751675
.appendField(new Blockly.FieldDropdown([["DO ","C2"], ["RE ","D2"], ["MI ","E2"], ["FA ","F2"], ["SOL ","G2"], ["LA ","A3"], ["SI ","B3"], ["DO+ ","C3"], ["RE+ ","D3"], ["PAUSA","PAUSE"]]), "NAME");
1676-
this.setInputsInlin(true);
1676+
this.setInputsInline(true);
16771677
this.setPreviousStatement(true, null);
16781678
this.setNextStatement(true, null);
16791679
this.setColour(345);
@@ -1685,28 +1685,29 @@ export default {
16851685
16861686
Blockly.Python['coderbot_music_note_basic'] = function(block) {
16871687
var dropdown_name = block.getFieldValue('NAME');
1688-
// TODO: Assemble Python into code variable.
1689-
var code = 'get_music().play_note()\n';
1688+
var code = 'get_music().play_note("'+dropdown_name+'")\n';
16901689
return code;
16911690
};
16921691
16931692
16941693
Blockly.Blocks['coderbot_animal_verse_basic'] = {
16951694
init: function() {
16961695
this.appendDummyInput()
1697-
.appendField(new Blockly.FieldImage("/static/images/blocks/animal.png", 15, 15, { alt: "*", flipRtl: "FALSE" }))
1696+
.appendField(new Blockly.FieldImage("/static/images/blocks/animal.png", 30, 30, { alt: "*", flipRtl: "FALSE" }))
16981697
.appendField("Verso del")
16991698
.appendField(new Blockly.FieldDropdown([["Gatto","cat"], ["Cane","dog"]]), "Verso del");
1699+
this.setInputsInline(true);
1700+
this.setPreviousStatement(true, null);
1701+
this.setNextStatement(true, null);
17001702
this.setColour(290);
17011703
this.setTooltip("Verso animale");
17021704
this.setHelpUrl("");
17031705
}
17041706
};
17051707
1706-
Blockly.Python['coderbot_animal_verse_basic'] = function(block) {
1708+
Blockly.Python['coderbot_animal_verse_basic'] = function(block) {
17071709
var dropdown_animal = block.getFieldValue('Verso del');
1708-
// TODO: Assemble Python into code variable.
1709-
var code = 'get_music().play_animal(dropdown_animal)\n';
1710+
var code = 'get_music().play_animal("'+dropdown_animal+'")\n';
17101711
return code;
17111712
};
17121713

0 commit comments

Comments
 (0)