Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions blocks_vertical/default_toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ Blockly.Blocks.defaultToolbox = '<xml id="toolbox-categories" style="display: no
'</value>'+
'</block>'+
'<block type="motion_ifonedgebounce"></block>'+
'<block type="motion_setrotationstyle">'+
'<value name="STYLE">'+
'<shadow type="motion_setrotationstyle_menu"></shadow>'+
'</value>'+
'</block>'+
'<block type="motion_setrotationstyle"></block>'+
'<block type="motion_xposition"></block>'+
'<block type="motion_yposition"></block>'+
'<block type="motion_direction"></block>'+
Expand Down Expand Up @@ -196,19 +192,13 @@ Blockly.Blocks.defaultToolbox = '<xml id="toolbox-categories" style="display: no
'</value>'+
'</block>'+
'<block type="looks_changeeffectby">'+
'<value name="EFFECT">'+
'<shadow type="looks_effectmenu"></shadow>'+
'</value>'+
'<value name="CHANGE">'+
'<shadow type="math_number">'+
'<field name="NUM">10</field>'+
'</shadow>'+
'</value>'+
'</block>'+
'<block type="looks_seteffectto">'+
'<value name="EFFECT">'+
'<shadow type="looks_effectmenu"></shadow>'+
'</value>'+
'<value name="VALUE">'+
'<shadow type="math_number">'+
'<field name="NUM">10</field>'+
Expand Down Expand Up @@ -289,23 +279,17 @@ Blockly.Blocks.defaultToolbox = '<xml id="toolbox-categories" style="display: no
'<shadow type="sound_instruments_menu"></shadow>' +
'</value>' +
'</block>'+
'<block type="sound_seteffectto">' +
'<value name="EFFECT">' +
'<shadow type="sound_effects_menu"></shadow>' +
'</value>' +
'<block type="sound_changeeffectby">' +
'<value name="VALUE">' +
'<shadow type="math_number">'+
'<field name="NUM">100</field>'+
'<field name="NUM">10</field>'+
'</shadow>'+
'</value>' +
'</block>' +
'<block type="sound_changeeffectby">' +
'<value name="EFFECT">' +
'<shadow type="sound_effects_menu"></shadow>' +
'</value>' +
'<block type="sound_seteffectto">' +
'<value name="VALUE">' +
'<shadow type="math_number">'+
'<field name="NUM">10</field>'+
'<field name="NUM">100</field>'+
'</shadow>'+
'</value>' +
'</block>' +
Expand Down Expand Up @@ -741,9 +725,6 @@ Blockly.Blocks.defaultToolbox = '<xml id="toolbox-categories" style="display: no
'</value>'+
'</block>'+
'<block type="operator_mathop">'+
'<value name="OPERATOR">'+
'<shadow type="operator_mathop_menu"></shadow>'+
'</value>'+
'<value name="NUM">'+
'<shadow type="math_number">'+
'<field name="NUM"></field>'+
Expand Down
52 changes: 15 additions & 37 deletions blocks_vertical/looks.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,39 +169,15 @@ Blockly.Blocks['looks_hide'] = {
}
};

Blockly.Blocks['looks_effectmenu'] = {
/**
* Graphic effects drop-down menu.
* @this Blockly.Block
*/
init: function() {
this.jsonInit(
{
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "EFFECT",
"options": [
['color', 'COLOR'],
['fisheye', 'FISHEYE'],
['whirl', 'WHIRL'],
['pixelate', 'PIXELATE'],
['mosaic', 'MOSAIC'],
['brightness', 'BRIGHTNESS'],
['ghost', 'GHOST']
]
}
],
"inputsInline": true,
"output": "String",
"colour": Blockly.Colours.looks.secondary,
"colourSecondary": Blockly.Colours.looks.secondary,
"colourTertiary": Blockly.Colours.looks.tertiary,
"outputShape": Blockly.OUTPUT_SHAPE_ROUND
});
}
};
Blockly.Blocks['looks_effect_menu_options'] = [
['color', 'COLOR'],
['fisheye', 'FISHEYE'],
['whirl', 'WHIRL'],
['pixelate', 'PIXELATE'],
['mosaic', 'MOSAIC'],
['brightness', 'BRIGHTNESS'],
['ghost', 'GHOST']
];

Blockly.Blocks['looks_changeeffectby'] = {
/**
Expand All @@ -213,8 +189,9 @@ Blockly.Blocks['looks_changeeffectby'] = {
"message0": "change effect %1 by %2",
"args0": [
{
"type": "input_value",
"name": "EFFECT"
"type": "field_dropdown",
"name": "EFFECT",
"options": Blockly.Blocks['looks_effect_menu_options']
},
{
"type": "input_value",
Expand Down Expand Up @@ -242,8 +219,9 @@ Blockly.Blocks['looks_seteffectto'] = {
"message0": "set effect %1 to %2",
"args0": [
{
"type": "input_value",
"name": "EFFECT"
"type": "field_dropdown",
"name": "EFFECT",
"options": Blockly.Blocks['looks_effect_menu_options']
},
{
"type": "input_value",
Expand Down
39 changes: 7 additions & 32 deletions blocks_vertical/motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,36 +426,6 @@ Blockly.Blocks['motion_ifonedgebounce'] = {
}
};

Blockly.Blocks['motion_setrotationstyle_menu'] = {
/**
* Rotation style drop-down menu.
* @this Blockly.Block
*/
init: function() {
this.jsonInit(
{
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "STYLE",
"options": [
['left-right', 'left-right'],
['don\'t rotate', 'don\'t rotate'],
['all around', 'all around']
]
}
],
"inputsInline": true,
"output": "String",
"colour": Blockly.Colours.motion.secondary,
"colourSecondary": Blockly.Colours.motion.secondary,
"colourTertiary": Blockly.Colours.motion.tertiary,
"outputShape": Blockly.OUTPUT_SHAPE_ROUND
});
}
};

Blockly.Blocks['motion_setrotationstyle'] = {
/**
* Block to set rotation style.
Expand All @@ -466,8 +436,13 @@ Blockly.Blocks['motion_setrotationstyle'] = {
"message0": "set rotation style %1",
"args0": [
{
"type": "input_value",
"name": "STYLE"
"type": "field_dropdown",
"name": "STYLE",
"options": [
['left-right', 'left-right'],
['don\'t rotate', 'don\'t rotate'],
['all around', 'all around']
]
}
],
"previousStatement": null,
Expand Down
31 changes: 3 additions & 28 deletions blocks_vertical/operators.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,15 @@ Blockly.Blocks['operator_round'] = {
}
};

Blockly.Blocks['operator_mathop_menu'] = {
Blockly.Blocks['operator_mathop'] = {
/**
* Math ops drop-down menu.
* Block for "advanced" math ops on a number.
* @this Blockly.Block
*/
init: function() {
this.jsonInit(
{
"message0": "%1",
"message0": "%1 of %2",
"args0": [
{
"type": "field_dropdown",
Expand All @@ -520,31 +520,6 @@ Blockly.Blocks['operator_mathop_menu'] = {
['e ^', 'e ^'],
['10 ^', '10 ^']
]
}
],
"inputsInline": true,
"output": "String",
"colour": Blockly.Colours.operators.secondary,
"colourSecondary": Blockly.Colours.operators.secondary,
"colourTertiary": Blockly.Colours.operators.tertiary,
"outputShape": Blockly.OUTPUT_SHAPE_ROUND
});
}
};

Blockly.Blocks['operator_mathop'] = {
/**
* Block for "advanced" math ops on a number.
* @this Blockly.Block
*/
init: function() {
this.jsonInit(
{
"message0": "%1 of %2",
"args0": [
{
"type": "input_value",
"name": "OPERATOR"
},
{
"type": "input_value",
Expand Down
53 changes: 15 additions & 38 deletions blocks_vertical/sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ goog.require('Blockly.Blocks');
goog.require('Blockly.Colours');
goog.require('Blockly.constants');


Blockly.Blocks['sound_sounds_menu'] = {
/**
* Sound effects drop-down menu.
Expand Down Expand Up @@ -256,38 +255,14 @@ Blockly.Blocks['sound_playnoteforbeats'] = {
}
};

Blockly.Blocks['sound_effects_menu'] = {
/**
* Sound effects drop-down menu.
* @this Blockly.Block
*/
init: function() {
this.jsonInit(
{
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "EFFECT",
"options": [
['pitch', 'PITCH'],
['pan left/right', 'PAN'],
['echo', 'ECHO'],
['reverb', 'REVERB'],
['fuzz', 'FUZZ'],
['robot', 'ROBOT']
]
}
],
"inputsInline": true,
"output": "String",
"colour": Blockly.Colours.sounds.secondary,
"colourSecondary": Blockly.Colours.sounds.secondary,
"colourTertiary": Blockly.Colours.sounds.tertiary,
"outputShape": Blockly.OUTPUT_SHAPE_ROUND
});
}
};
Blockly.Blocks['sound_effects_menu_options'] = [
['pitch', 'PITCH'],
['pan left/right', 'PAN'],
['echo', 'ECHO'],
['reverb', 'REVERB'],
['fuzz', 'FUZZ'],
['robot', 'ROBOT']
];

Blockly.Blocks['sound_seteffectto'] = {
/**
Expand All @@ -299,8 +274,9 @@ Blockly.Blocks['sound_seteffectto'] = {
"message0": "set effect %1 to %2",
"args0": [
{
"type": "input_value",
"name": "EFFECT"
"type": "field_dropdown",
"name": "EFFECT",
"options": Blockly.Blocks['sound_effects_menu_options']
},
{
"type": "input_value",
Expand All @@ -327,8 +303,9 @@ Blockly.Blocks['sound_changeeffectby'] = {
"message0": "change effect %1 by %2",
"args0": [
{
"type": "input_value",
"name": "EFFECT"
"type": "field_dropdown",
"name": "EFFECT",
"options": Blockly.Blocks['sound_effects_menu_options']
},
{
"type": "input_value",
Expand All @@ -351,7 +328,7 @@ Blockly.Blocks['sound_cleareffects'] = {
*/
init: function() {
this.jsonInit({
"message0": "clear audio effects",
"message0": "clear sound effects",
"previousStatement": null,
"nextStatement": null,
"colour": Blockly.Colours.sounds.primary,
Expand Down