scratch-blocks
Advanced tools
Comparing version 0.1.0-prerelease.1476381009 to 0.1.0-prerelease.1476392829
@@ -30,3 +30,3 @@ // Do not edit this file; automatically generated by build.py. | ||
colourTertiary:Blockly.Colours.control.tertiary})}};Blockly.Blocks.control_stop={init:function(){this.jsonInit({id:"control_stop",message0:"%1",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_stop.svg",width:40,height:40,alt:"Stop"}],inputsInline:!0,previousStatement:null,category:Blockly.Categories.control,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}}; | ||
Blockly.Blocks.control_wait={init:function(){this.jsonInit({id:"control_wait",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_wait.svg",width:40,height:40,alt:"Wait"},{type:"input_value",name:"DURATION",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,category:Blockly.Categories.control,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}};Blockly.Blocks.event={};Blockly.Blocks.event_whenflagclicked={init:function(){this.jsonInit({id:"event_whenflagclicked",message0:"%1",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_whenflagclicked.svg",width:40,height:40,alt:"When green flag clicked",flip_rtl:!0}],inputsInline:!0,nextStatement:null,category:Blockly.Categories.event,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}}; | ||
Blockly.Blocks.control_wait={init:function(){this.jsonInit({id:"control_wait",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_wait.svg",width:40,height:40,alt:"Wait"},{type:"input_value",name:"DURATION",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,category:Blockly.Categories.control,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}};Blockly.Blocks.defaultToolbox='<xml id="toolbox-categories" style="display: none"><category name="Events"><block type="event_whenflagclicked"></block><block type="event_whenbroadcastreceived"><value name="CHOICE"><shadow type="dropdown_whenbroadcast"><field name="CHOICE">blue</field></shadow></value></block><block type="event_broadcast"><value name="CHOICE"><shadow type="dropdown_broadcast"><field name="CHOICE">blue</field></shadow></value></block></category><category name="Control"><block type="control_forever"></block><block type="control_repeat"><value name="TIMES"><shadow type="math_whole_number"><field name="NUM">4</field></shadow></value></block><block type="control_stop"></block><block type="control_wait"><value name="DURATION"><shadow type="math_positive_number"><field name="NUM">1</field></shadow></value></block></category><category name="Wedo"><block type="wedo_setcolor"><value name="CHOICE"><shadow type="dropdown_wedo_setcolor"><field name="CHOICE">mystery</field></shadow></value></block><block type="wedo_motorclockwise"><value name="DURATION"><shadow type="math_positive_number"><field name="NUM">1</field></shadow></value></block><block type="wedo_motorcounterclockwise"><value name="DURATION"><shadow type="math_positive_number"><field name="NUM">1</field></shadow></value></block><block type="wedo_motorspeed"><value name="CHOICE"><shadow type="dropdown_wedo_motorspeed"><field name="CHOICE">fast</field></shadow></value></block><block type="wedo_whentilt"><value name="CHOICE"><shadow type="dropdown_wedo_whentilt"><field name="CHOICE">forward</field></shadow></value></block><block type="wedo_whendistanceclose"></block></category></xml><xml id="toolbox-simple" style="display: none"><block type="event_whenflagclicked"></block><block type="event_whenbroadcastreceived"><value name="CHOICE"><shadow type="dropdown_whenbroadcast"><field name="CHOICE">blue</field></shadow></value></block><block type="event_broadcast"><value name="CHOICE"><shadow type="dropdown_broadcast"><field name="CHOICE">blue</field></shadow></value></block><block type="control_forever"></block><block type="control_repeat"><value name="TIMES"><shadow type="math_whole_number"><field name="NUM">4</field></shadow></value></block><block type="control_stop"></block><block type="control_wait"><value name="DURATION"><shadow type="math_positive_number"><field name="NUM">1</field></shadow></value></block></xml>';Blockly.Blocks.event={};Blockly.Blocks.event_whenflagclicked={init:function(){this.jsonInit({id:"event_whenflagclicked",message0:"%1",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_whenflagclicked.svg",width:40,height:40,alt:"When green flag clicked",flip_rtl:!0}],inputsInline:!0,nextStatement:null,category:Blockly.Categories.event,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}}; | ||
Blockly.Blocks.dropdown_whenbroadcast={init:function(){this.appendDummyInput().appendField(new Blockly.FieldIconMenu([{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_blue.svg",value:"blue",width:48,height:48,alt:"Blue"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_green.svg",value:"green",width:48,height:48,alt:"Green"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_coral.svg",value:"coral", | ||
@@ -33,0 +33,0 @@ width:48,height:48,alt:"Coral"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_magenta.svg",value:"magenta",width:48,height:48,alt:"Magenta"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_orange.svg",value:"orange",width:48,height:48,alt:"Orange"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_purple.svg",value:"purple",width:48,height:48,alt:"Purple"}]),"CHOICE");this.setOutput(!0);this.setColour(Blockly.Colours.event.primary, |
@@ -49,2 +49,7 @@ /** | ||
} else { | ||
if (!options['toolbox']) { | ||
var oParser = new DOMParser(); | ||
var dom = oParser.parseFromString(Blockly.Blocks.defaultToolbox, 'text/xml'); | ||
options['toolbox'] = dom.children[0]; | ||
} | ||
var languageTree = Blockly.Options.parseToolboxTree(options['toolbox']); | ||
@@ -51,0 +56,0 @@ var hasCategories = Boolean(languageTree && |
{ | ||
"name": "scratch-blocks", | ||
"version": "0.1.0-prerelease.1476381009", | ||
"version": "0.1.0-prerelease.1476392829", | ||
"description": "Scratch Blocks is a library for building creative computing interfaces.", | ||
@@ -11,3 +11,3 @@ "author": "Massachusetts Institute of Technology", | ||
"url": "https://github.com/LLK/scratch-blocks.git", | ||
"sha": "b90221cd73754ca06efa78061b83709d9481d4c7" | ||
"sha": "2d48a260ed40fdd6471894fcfc7af49c11b6dc60" | ||
}, | ||
@@ -14,0 +14,0 @@ "main": "./dist/vertical.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5686205
187
55410