File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/lib/ruby-to-blocks-converter Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -61,13 +61,20 @@ const MicroBitConverter = {
61
61
break ;
62
62
case 'display_text' :
63
63
if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
64
- block = this . _changeBlock ( receiver , 'microbit_displayText' , 'sentence ' ) ;
64
+ block = this . _changeBlock ( receiver , 'microbit_displayText' , 'statement ' ) ;
65
65
delete this . _context . blocks [ receiver . inputs . EXPRESSION . block ] ;
66
66
delete receiver . inputs . EXPRESSION ;
67
67
68
68
this . _addTextInput ( block , 'TEXT' , args [ 0 ] , 'Hello!' ) ;
69
69
}
70
70
break ;
71
+ case 'clear_display' :
72
+ if ( args . length === 0 ) {
73
+ block = this . _changeBlock ( receiver , 'microbit_displayClear' , 'statement' ) ;
74
+ delete this . _context . blocks [ receiver . inputs . EXPRESSION . block ] ;
75
+ delete receiver . inputs . EXPRESSION ;
76
+ }
77
+ break ;
71
78
}
72
79
}
73
80
return block ;
You can’t perform that action at this time.
0 commit comments