Blockly.Blocks.set_leds = {
helpUrl: null,
init: function() {
this.setColour(0);
this.appendValueInput("NAME")
.setCheck(null)
.appendField("Set LEDs");
this.appendDummyInput()
.appendField("to function")
.appendField(new Blockly.FieldDropdown(this.FUNCTIONS), 'Function')
.appendField("with colour")
.appendField(new Blockly.FieldDropdown(this.COLOURS), 'Colour1')
.appendField(new Blockly.FieldDropdown(this.COLOURS), 'Colour2');
this.setInputsInline(true);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
}
};
Blockly.Blocks.set_haze.FUNCTIONS =
[
["1", '1'],
["2", '2'],
["3", '3'],
];
Blockly.Blocks.set_haze.COLOURS =
[
["Off", 'off'],
["White", 'white'],
["Red", 'red']
["Blue", 'Blue']
["Green", 'green']
];