File size: 691 Bytes
fbe84a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/**

 * @fileoverview Custom blocks for Blockly.

 * @author @SharkPool-SP (SharkPool)

 */

'use strict';

goog.provide('Blockly.Blocks.customInput');

goog.require('Blockly.Blocks');

goog.require('Blockly.Colours');

goog.require('Blockly.constants');

Blockly.Blocks['customInput'] = {
  /**

   * Block for custom inputs.

   * @this Blockly.Block

   */
  init: function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_customInput",
          "name": "CUSTOM"
        }
      ],
      "outputShape": Blockly.OUTPUT_SHAPE_SQUARE,
      "output": "String",
      "extensions": ["colours_pen"]
    });
  }
};