forked from scratchfoundation/scratch-blocks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
blocks_compressed_horizontal.js
49 lines (43 loc) · 13.2 KB
/
blocks_compressed_horizontal.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Do not edit this file; automatically generated by build.py.
'use strict';
/*
Visual Blocks Editor
Copyright 2016 Massachusetts Institute of Technology
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
Blockly.Colours={motion:{primary:"#4C97FF",secondary:"#4280D7",tertiary:"#3373CC"},looks:{primary:"#9966FF",secondary:"#855CD6",tertiary:"#774DCB"},sounds:{primary:"#D65CD6",secondary:"#BF40BF",tertiary:"#A63FA6"},control:{primary:"#FFAB19",secondary:"#EC9C13",tertiary:"#CF8B17"},event:{primary:"#FFD500",secondary:"#DBC200",tertiary:"#CCAA00"},operators:{primary:"#4CBF56",secondary:"#489D84",tertiary:"#489D84"},text:"#575E75",workspace:"#F5F8FF",toolbox:"#DDDDDD",toolboxText:"#000000",flyout:"#DDDDDD",
scrollbar:"#CCCCCC",scrollbarHover:"#BBBBBB",textField:"#FFFFFF",insertionMarker:"#949494",insertionMarkerOpacity:.6,dragShadowOpacity:.3,stackGlow:"#FFF200",stackGlowOpacity:1,fieldShadow:"rgba(0,0,0,0.1)",dropDownShadow:"rgba(0, 0, 0, .3)",numPadBackground:"#547AB2",numPadBorder:"#435F91",numPadActiveBackground:"#435F91",numPadText:"#FFFFFF"};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,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",
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,
Blockly.Colours.event.secondary,Blockly.Colours.event.tertiary)}};
Blockly.Blocks.event_whenbroadcastreceived={init:function(){this.jsonInit({id:"event_whenbroadcastreceived",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_when-broadcast-received_blue.svg",width:40,height:40,alt:"Broadcast received"},{type:"input_value",name:"CHOICE"}],inputsInline:!0,nextStatement:null,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}};
Blockly.Blocks.dropdown_broadcast={init:function(){this.appendDummyInput().appendField(new Blockly.FieldIconMenu([{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_blue.svg",value:"blue",width:48,height:48,alt:"Blue"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_green.svg",value:"green",width:48,height:48,alt:"Green"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_coral.svg",value:"coral",width:48,height:48,alt:"Coral"},{src:Blockly.mainWorkspace.options.pathToMedia+
"icons/event_broadcast_magenta.svg",value:"magenta",width:48,height:48,alt:"Magenta"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_orange.svg",value:"orange",width:48,height:48,alt:"Orange"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_purple.svg",value:"purple",width:48,height:48,alt:"Purple"}]),"CHOICE");this.setOutput(!0);this.setColour(Blockly.Colours.event.primary,Blockly.Colours.event.secondary,Blockly.Colours.event.tertiary)}};
Blockly.Blocks.event_broadcast={init:function(){this.jsonInit({id:"event_broadcast",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/event_broadcast_blue.svg",width:40,height:40,alt:"Broadcast"},{type:"input_value",name:"CHOICE"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}};Blockly.Blocks.wedo={};
Blockly.Blocks.dropdown_wedo_setcolor={init:function(){this.appendDummyInput().appendField(new Blockly.FieldIconMenu([{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_mystery.svg",value:"mystery",width:48,height:48,alt:"Mystery"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_yellow.svg",value:"yellow",width:48,height:48,alt:"Yellow"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_orange.svg",value:"orange",width:48,height:48,alt:"Orange"},{src:Blockly.mainWorkspace.options.pathToMedia+
"icons/set-led_coral.svg",value:"coral",width:48,height:48,alt:"Coral"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_magenta.svg",value:"magenta",width:48,height:48,alt:"Magenta"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_purple.svg",value:"purple",width:48,height:48,alt:"Purple"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_blue.svg",value:"blue",width:48,height:48,alt:"Blue"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_green.svg",
value:"green",width:48,height:48,alt:"Green"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_white.svg",value:"white",width:48,height:48,alt:"White"}]),"CHOICE");this.setOutput(!0);this.setColour(Blockly.Colours.looks.primary,Blockly.Colours.looks.secondary,Blockly.Colours.looks.tertiary)}};
Blockly.Blocks.wedo_setcolor={init:function(){this.jsonInit({id:"wedo_setcolor",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/set-led_blue.svg",width:40,height:40,alt:"Set LED Color"},{type:"input_value",name:"CHOICE"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.looks.primary,colourSecondary:Blockly.Colours.looks.secondary,colourTertiary:Blockly.Colours.looks.tertiary})}};
Blockly.Blocks.wedo_motorclockwise={init:function(){this.jsonInit({id:"wedo_motorclockwise",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-clockwise.svg",width:40,height:40,alt:"Turn motor clockwise"},{type:"input_value",name:"DURATION",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.motion.primary,colourSecondary:Blockly.Colours.motion.secondary,colourTertiary:Blockly.Colours.motion.tertiary})}};
Blockly.Blocks.wedo_motorcounterclockwise={init:function(){this.jsonInit({id:"wedo_motorcounterclockwise",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-counterclockwise.svg",width:40,height:40,alt:"Turn motor counter-clockwise"},{type:"input_value",name:"DURATION",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.motion.primary,colourSecondary:Blockly.Colours.motion.secondary,colourTertiary:Blockly.Colours.motion.tertiary})}};
Blockly.Blocks.dropdown_wedo_motorspeed={init:function(){this.appendDummyInput().appendField(new Blockly.FieldIconMenu([{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-speed_slow.svg",value:"slow",width:48,height:48,alt:"Slow"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-speed_med.svg",value:"medium",width:48,height:48,alt:"Medium"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-speed_fast.svg",value:"fast",width:48,height:48,alt:"Fast"}]),"CHOICE");
this.setOutput(!0);this.setColour(Blockly.Colours.motion.primary,Blockly.Colours.motion.secondary,Blockly.Colours.motion.tertiary)}};
Blockly.Blocks.wedo_motorspeed={init:function(){this.jsonInit({id:"wedo_motorspeed",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_motor-speed_fast.svg",width:40,height:40,alt:"Motor Speed"},{type:"input_value",name:"CHOICE"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.motion.primary,colourSecondary:Blockly.Colours.motion.secondary,colourTertiary:Blockly.Colours.motion.tertiary})}};
Blockly.Blocks.dropdown_wedo_whentilt={init:function(){this.appendDummyInput().appendField(new Blockly.FieldIconMenu([{type:"placeholder",width:48,height:48},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-tilt-forward.svg",value:"forward",width:48,height:48,alt:"Tilt forward"},{type:"placeholder",width:48,height:48},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-tilt-left.svg",value:"left",width:48,height:48,alt:"Tilt left"},{src:Blockly.mainWorkspace.options.pathToMedia+
"icons/wedo_when-tilt.svg",value:"any",width:48,height:48,alt:"Tilt any"},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-tilt-right.svg",value:"right",width:48,height:48,alt:"Tilt right"},{type:"placeholder",width:48,height:48},{src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-tilt-backward.svg",value:"backward",width:48,height:48,alt:"Tilt backward"}]),"CHOICE");this.setOutput(!0);this.setColour(Blockly.Colours.event.primary,Blockly.Colours.event.secondary,Blockly.Colours.event.tertiary)}};
Blockly.Blocks.wedo_whentilt={init:function(){this.jsonInit({id:"wedo_whentilt",message0:"%1 %2",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-tilt.svg",width:40,height:40,alt:"When tilted"},{type:"input_value",name:"CHOICE"}],inputsInline:!0,nextStatement:null,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}};
Blockly.Blocks.wedo_whendistanceclose={init:function(){this.jsonInit({id:"wedo_whendistanceclose",message0:"%1",args0:[{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/wedo_when-distance_close.svg",width:40,height:40,alt:"When distance close"}],inputsInline:!0,nextStatement:null,colour:Blockly.Colours.event.primary,colourSecondary:Blockly.Colours.event.secondary,colourTertiary:Blockly.Colours.event.tertiary})}};Blockly.Blocks.control={};
Blockly.Blocks.control_repeat={init:function(){this.jsonInit({id:"control_repeat",message0:"%1 %2 %3",args0:[{type:"input_statement",name:"SUBSTACK"},{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_repeat.svg",width:40,height:40,alt:"*",flip_rtl:!0},{type:"input_value",name:"TIMES",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}};
Blockly.Blocks.control_forever={init:function(){this.jsonInit({id:"control_forever",message0:"%1 %2",args0:[{type:"input_statement",name:"SUBSTACK"},{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_forever.svg",width:40,height:40,alt:"*",flip_rtl:!0}],inputsInline:!0,previousStatement:null,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}};
Blockly.Blocks.control_repeat={init:function(){this.jsonInit({id:"control_repeat",message0:"%1 %2 %3",args0:[{type:"input_statement",name:"SUBSTACK"},{type:"field_image",src:Blockly.mainWorkspace.options.pathToMedia+"icons/control_repeat.svg",width:40,height:40,alt:"*",flip_rtl:!0},{type:"input_value",name:"TIMES",check:"Number"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,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,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,colour:Blockly.Colours.control.primary,colourSecondary:Blockly.Colours.control.secondary,colourTertiary:Blockly.Colours.control.tertiary})}};