diff --git a/blocks_vertical/default_toolbox.js b/blocks_vertical/default_toolbox.js index 8c5624fad4..a45b7281f5 100644 --- a/blocks_vertical/default_toolbox.js +++ b/blocks_vertical/default_toolbox.js @@ -397,6 +397,12 @@ Blockly.Blocks.defaultToolbox = '' + + '' + + '' + + '' + + '' + +'' + '' + '' + '' + diff --git a/blocks_vertical/operators.js b/blocks_vertical/operators.js index 1caa04481c..a2fb66f76f 100644 --- a/blocks_vertical/operators.js +++ b/blocks_vertical/operators.js @@ -123,7 +123,29 @@ Blockly.Blocks['operator_divide'] = { }); } }; - +Blockly.Blocks['operator_exponent'] = { + /** + * Block for raising one number to the power of another. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.OPERATORS_EXPONENT, + "args0": [ + { + "type": "input_value", + "name": "NUM1" + }, + { + "type": "input_value", + "name": "NUM2" + } + ], + "category": Blockly.Categories.operators, + "extensions": ["colours_operators", "output_number"] + }); + } +}; Blockly.Blocks['operator_random'] = { /** * Block for picking a random number. diff --git a/msg/messages.js b/msg/messages.js index c7c1e613fe..400bc2598d 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -185,6 +185,7 @@ Blockly.Msg.OPERATORS_ADD = '%1 + %2'; Blockly.Msg.OPERATORS_SUBTRACT = '%1 - %2'; Blockly.Msg.OPERATORS_MULTIPLY = '%1 * %2'; Blockly.Msg.OPERATORS_DIVIDE = '%1 / %2'; +Blockly.Msg.OPERATORS_EXPONENT = '%1 ^ %2'; Blockly.Msg.OPERATORS_RANDOM = 'pick random %1 to %2'; Blockly.Msg.OPERATORS_GT = '%1 > %2'; Blockly.Msg.OPERATORS_LT = '%1 < %2';