Remove use of style variables in block definition

This commit is contained in:
alschmiedt
2018-12-20 10:09:47 -08:00
parent ebe8492d3d
commit d9c4608da8
13 changed files with 81 additions and 100 deletions

View File

@@ -56,7 +56,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"output": "Colour",
"helpUrl": "%{BKY_COLOUR_PICKER_HELPURL}",
"style": "%{BKY_COLOUR_STYLE}",
"style": "colour",
"tooltip": "%{BKY_COLOUR_PICKER_TOOLTIP}",
"extensions": ["parent_tooltip_when_inline"]
},
@@ -67,7 +67,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"message0": "%{BKY_COLOUR_RANDOM_TITLE}",
"output": "Colour",
"helpUrl": "%{BKY_COLOUR_RANDOM_HELPURL}",
"style": "%{BKY_COLOUR_STYLE}",
"style": "colour",
"tooltip": "%{BKY_COLOUR_RANDOM_TOOLTIP}"
},
@@ -97,7 +97,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"output": "Colour",
"helpUrl": "%{BKY_COLOUR_RGB_HELPURL}",
"style": "%{BKY_COLOUR_STYLE}",
"style": "colour",
"tooltip": "%{BKY_COLOUR_RGB_TOOLTIP}"
},
@@ -128,7 +128,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"output": "Colour",
"helpUrl": "%{BKY_COLOUR_BLEND_HELPURL}",
"style": "%{BKY_COLOUR_STYLE}",
"style": "colour",
"tooltip": "%{BKY_COLOUR_BLEND_TOOLTIP}"
}
]); // END JSON EXTRACT (Do not delete this comment.)

View File

@@ -51,7 +51,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "lists_create_empty",
"message0": "%{BKY_LISTS_CREATE_EMPTY_TITLE}",
"output": "Array",
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": "%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}",
"helpUrl": "%{BKY_LISTS_CREATE_EMPTY_HELPURL}"
},
@@ -71,7 +71,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Array",
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": "%{BKY_LISTS_REPEAT_TOOLTIP}",
"helpUrl": "%{BKY_LISTS_REPEAT_HELPURL}"
},
@@ -88,7 +88,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"output": "Array",
"inputsInline": true,
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": "%{BKY_LISTS_REVERSE_TOOLTIP}",
"helpUrl": "%{BKY_LISTS_REVERSE_HELPURL}"
},
@@ -104,7 +104,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Boolean",
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": "%{BKY_LISTS_ISEMPTY_TOOLTIP}",
"helpUrl": "%{BKY_LISTS_ISEMPTY_HELPURL}"
},
@@ -120,7 +120,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": "%{BKY_LISTS_LENGTH_TOOLTIP}",
"helpUrl": "%{BKY_LISTS_LENGTH_HELPURL}"
}
@@ -133,7 +133,7 @@ Blockly.Blocks['lists_create_with'] = {
*/
init: function() {
this.setHelpUrl(Blockly.Msg['LISTS_CREATE_WITH_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.itemCount_ = 3;
this.updateShape_();
this.setOutput(true, 'Array');
@@ -256,7 +256,7 @@ Blockly.Blocks['lists_create_with_container'] = {
* @this Blockly.Block
*/
init: function() {
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.appendDummyInput()
.appendField(Blockly.Msg['LISTS_CREATE_WITH_CONTAINER_TITLE_ADD']);
this.appendStatementInput('STACK');
@@ -271,7 +271,7 @@ Blockly.Blocks['lists_create_with_item'] = {
* @this Blockly.Block
*/
init: function() {
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.appendDummyInput()
.appendField(Blockly.Msg['LISTS_CREATE_WITH_ITEM_TITLE']);
this.setPreviousStatement(true);
@@ -293,7 +293,7 @@ Blockly.Blocks['lists_indexOf'] = {
[Blockly.Msg['LISTS_INDEX_OF_LAST'], 'LAST']
];
this.setHelpUrl(Blockly.Msg['LISTS_INDEX_OF_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.setOutput(true, 'Number');
this.appendValueInput('VALUE')
.setCheck('Array')
@@ -331,7 +331,7 @@ Blockly.Blocks['lists_getIndex'] = {
[Blockly.Msg['LISTS_GET_INDEX_RANDOM'], 'RANDOM']
];
this.setHelpUrl(Blockly.Msg['LISTS_GET_INDEX_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
var modeMenu = new Blockly.FieldDropdown(MODE, function(value) {
var isStatement = (value == 'REMOVE');
this.sourceBlock_.updateStatement_(isStatement);
@@ -515,7 +515,7 @@ Blockly.Blocks['lists_setIndex'] = {
[Blockly.Msg['LISTS_GET_INDEX_RANDOM'], 'RANDOM']
];
this.setHelpUrl(Blockly.Msg['LISTS_SET_INDEX_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.appendValueInput('LIST')
.setCheck('Array')
.appendField(Blockly.Msg['LISTS_SET_INDEX_INPUT_IN_LIST']);
@@ -654,7 +654,7 @@ Blockly.Blocks['lists_getSublist'] = {
[Blockly.Msg['LISTS_GET_SUBLIST_END_LAST'], 'LAST']
];
this.setHelpUrl(Blockly.Msg['LISTS_GET_SUBLIST_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.appendValueInput('LIST')
.setCheck('Array')
.appendField(Blockly.Msg['LISTS_GET_SUBLIST_INPUT_IN_LIST']);
@@ -779,7 +779,7 @@ Blockly.Blocks['lists_sort'] = {
}
],
"output": "Array",
"style": "%{BKY_LISTS_STYLE}",
"style": "lists",
"tooltip": Blockly.Msg['LISTS_SORT_TOOLTIP'],
"helpUrl": Blockly.Msg['LISTS_SORT_HELPURL']
});
@@ -803,7 +803,7 @@ Blockly.Blocks['lists_split'] = {
thisBlock.updateType_(newMode);
});
this.setHelpUrl(Blockly.Msg['LISTS_SPLIT_HELPURL']);
this.setStyle(Blockly.Msg['LISTS_STYLE']);
this.setStyle("lists");
this.appendValueInput('INPUT')
.setCheck('String')
.appendField(dropdown, 'MODE');

View File

@@ -57,7 +57,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Boolean",
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_LOGIC_BOOLEAN_TOOLTIP}",
"helpUrl": "%{BKY_LOGIC_BOOLEAN_HELPURL}"
},
@@ -81,7 +81,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"helpUrl": "%{BKY_CONTROLS_IF_HELPURL}",
"mutator": "controls_if_mutator",
"extensions": ["controls_if_tooltip"]
@@ -113,7 +113,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKYCONTROLS_IF_TOOLTIP_2}",
"helpUrl": "%{BKY_CONTROLS_IF_HELPURL}",
"extensions": ["controls_if_tooltip"]
@@ -146,7 +146,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Boolean",
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"helpUrl": "%{BKY_LOGIC_COMPARE_HELPURL}",
"extensions": ["logic_compare", "logic_op_tooltip"]
},
@@ -176,7 +176,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Boolean",
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"helpUrl": "%{BKY_LOGIC_OPERATION_HELPURL}",
"extensions": ["logic_op_tooltip"]
},
@@ -192,7 +192,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Boolean",
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_LOGIC_NEGATE_TOOLTIP}",
"helpUrl": "%{BKY_LOGIC_NEGATE_HELPURL}"
},
@@ -201,7 +201,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "logic_null",
"message0": "%{BKY_LOGIC_NULL}",
"output": null,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_LOGIC_NULL_TOOLTIP}",
"helpUrl": "%{BKY_LOGIC_NULL_HELPURL}"
},
@@ -231,7 +231,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": null,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_LOGIC_TERNARY_TOOLTIP}",
"helpUrl": "%{BKY_LOGIC_TERNARY_HELPURL}",
"extensions": ["logic_ternary"]
@@ -245,7 +245,7 @@ Blockly.defineBlocksWithJsonArray([ // Mutator blocks. Do not extract.
"message0": "%{BKY_CONTROLS_IF_IF_TITLE_IF}",
"nextStatement": null,
"enableContextMenu": false,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_CONTROLS_IF_IF_TOOLTIP}"
},
// Block representing the else-if statement in the controls_if mutator.
@@ -255,7 +255,7 @@ Blockly.defineBlocksWithJsonArray([ // Mutator blocks. Do not extract.
"previousStatement": null,
"nextStatement": null,
"enableContextMenu": false,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}"
},
// Block representing the else statement in the controls_if mutator.
@@ -264,7 +264,7 @@ Blockly.defineBlocksWithJsonArray([ // Mutator blocks. Do not extract.
"message0": "%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}",
"previousStatement": null,
"enableContextMenu": false,
"style": "%{BKY_LOGIC_STYLE}",
"style": "logic",
"tooltip": "%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"
}
]);

View File

@@ -59,7 +59,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"tooltip": "%{BKY_CONTROLS_REPEAT_TOOLTIP}",
"helpUrl": "%{BKY_CONTROLS_REPEAT_HELPURL}"
},
@@ -82,7 +82,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"tooltip": "%{BKY_CONTROLS_REPEAT_TOOLTIP}",
"helpUrl": "%{BKY_CONTROLS_REPEAT_HELPURL}"
},
@@ -112,7 +112,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"helpUrl": "%{BKY_CONTROLS_WHILEUNTIL_HELPURL}",
"extensions": ["controls_whileUntil_tooltip"]
},
@@ -153,7 +153,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"inputsInline": true,
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"helpUrl": "%{BKY_CONTROLS_FOR_HELPURL}",
"extensions": [
"contextMenu_newGetVariableBlock",
@@ -183,7 +183,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"helpUrl": "%{BKY_CONTROLS_FOREACH_HELPURL}",
"extensions": [
"contextMenu_newGetVariableBlock",
@@ -203,7 +203,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
]
}],
"previousStatement": null,
"style": "%{BKY_LOOPS_STYLE}",
"style": "loops",
"helpUrl": "%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}",
"extensions": [
"controls_flow_tooltip",

View File

@@ -54,7 +54,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"output": "Number",
"helpUrl": "%{BKY_MATH_NUMBER_HELPURL}",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}",
"extensions": ["parent_tooltip_when_inline"]
},
@@ -88,7 +88,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"helpUrl": "%{BKY_MATH_ARITHMETIC_HELPURL}",
"extensions": ["math_op_tooltip"]
},
@@ -118,7 +118,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"helpUrl": "%{BKY_MATH_SINGLE_HELPURL}",
"extensions": ["math_op_tooltip"]
},
@@ -147,7 +147,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"helpUrl": "%{BKY_MATH_TRIG_HELPURL}",
"extensions": ["math_op_tooltip"]
},
@@ -171,7 +171,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_CONSTANT_TOOLTIP}",
"helpUrl": "%{BKY_MATH_CONSTANT_HELPURL}"
},
@@ -203,7 +203,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Boolean",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_IS_TOOLTIP}",
"mutator": "math_is_divisibleby_mutator"
},
@@ -226,7 +226,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_VARIABLES_STYLE}",
"style": "variables",
"helpUrl": "%{BKY_MATH_CHANGE_HELPURL}",
"extensions": ["math_change_tooltip"]
},
@@ -252,7 +252,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"helpUrl": "%{BKY_MATH_ROUND_HELPURL}",
"tooltip": "%{BKY_MATH_ROUND_TOOLTIP}"
},
@@ -284,7 +284,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"helpUrl": "%{BKY_MATH_ONLIST_HELPURL}",
"mutator": "math_modes_of_list_mutator",
"extensions": ["math_op_tooltip"]
@@ -308,7 +308,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_MODULO_TOOLTIP}",
"helpUrl": "%{BKY_MATH_MODULO_HELPURL}"
},
@@ -336,7 +336,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_CONSTRAIN_TOOLTIP}",
"helpUrl": "%{BKY_MATH_CONSTRAIN_HELPURL}"
},
@@ -359,7 +359,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_RANDOM_INT_TOOLTIP}",
"helpUrl": "%{BKY_MATH_RANDOM_INT_HELPURL}"
},
@@ -369,7 +369,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "math_random_float",
"message0": "%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",
"helpUrl": "%{BKY_MATH_RANDOM_FLOAT_HELPURL}"
},
@@ -392,7 +392,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"inputsInline": true,
"output": "Number",
"style": "%{BKY_MATH_STYLE}",
"style": "math",
"tooltip": "%{BKY_MATH_ATAN2_TOOLTIP}",
"helpUrl": "%{BKY_MATH_ATAN2_HELPURL}"
}

View File

@@ -50,7 +50,7 @@ Blockly.Blocks['procedures_defnoreturn'] = {
Blockly.Msg['PROCEDURES_DEFNORETURN_COMMENT']) {
this.setCommentText(Blockly.Msg['PROCEDURES_DEFNORETURN_COMMENT']);
}
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
this.setTooltip(Blockly.Msg['PROCEDURES_DEFNORETURN_TOOLTIP']);
this.setHelpUrl(Blockly.Msg['PROCEDURES_DEFNORETURN_HELPURL']);
this.arguments_ = [];
@@ -416,7 +416,7 @@ Blockly.Blocks['procedures_defreturn'] = {
Blockly.Msg['PROCEDURES_DEFRETURN_COMMENT']) {
this.setCommentText(Blockly.Msg['PROCEDURES_DEFRETURN_COMMENT']);
}
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
this.setTooltip(Blockly.Msg['PROCEDURES_DEFRETURN_TOOLTIP']);
this.setHelpUrl(Blockly.Msg['PROCEDURES_DEFRETURN_HELPURL']);
this.arguments_ = [];
@@ -462,7 +462,7 @@ Blockly.Blocks['procedures_mutatorcontainer'] = {
this.appendDummyInput('STATEMENT_INPUT')
.appendField(Blockly.Msg['PROCEDURES_ALLOW_STATEMENTS'])
.appendField(new Blockly.FieldCheckbox('TRUE'), 'STATEMENTS');
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
this.setTooltip(Blockly.Msg['PROCEDURES_MUTATORCONTAINER_TOOLTIP']);
this.contextMenu = false;
}
@@ -489,7 +489,7 @@ Blockly.Blocks['procedures_mutatorarg'] = {
.appendField(field, 'NAME');
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
this.setTooltip(Blockly.Msg['PROCEDURES_MUTATORARG_TOOLTIP']);
this.contextMenu = false;
@@ -562,7 +562,7 @@ Blockly.Blocks['procedures_callnoreturn'] = {
.appendField(this.id, 'NAME');
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
// Tooltip is set in renameProcedure.
this.setHelpUrl(Blockly.Msg['PROCEDURES_CALLNORETURN_HELPURL']);
this.arguments_ = [];
@@ -903,7 +903,7 @@ Blockly.Blocks['procedures_callreturn'] = {
this.appendDummyInput('TOPROW')
.appendField('', 'NAME');
this.setOutput(true);
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
// Tooltip is set in domToMutation.
this.setHelpUrl(Blockly.Msg['PROCEDURES_CALLRETURN_HELPURL']);
this.arguments_ = [];
@@ -940,7 +940,7 @@ Blockly.Blocks['procedures_ifreturn'] = {
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setStyle(Blockly.Msg['PROCEDURES_STYLE']);
this.setStyle("procedures");
this.setTooltip(Blockly.Msg['PROCEDURES_IFRETURN_TOOLTIP']);
this.setHelpUrl(Blockly.Msg['PROCEDURES_IFRETURN_HELPURL']);
this.hasReturnValue_ = true;

View File

@@ -48,7 +48,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"text": ""
}],
"output": "String",
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"helpUrl": "%{BKY_TEXT_TEXT_HELPURL}",
"tooltip": "%{BKY_TEXT_TEXT_TOOLTIP}",
"extensions": [
@@ -60,7 +60,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "text_join",
"message0": "",
"output": "String",
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"helpUrl": "%{BKY_TEXT_JOIN_HELPURL}",
"tooltip": "%{BKY_TEXT_JOIN_TOOLTIP}",
"mutator": "text_join_mutator"
@@ -76,7 +76,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"type": "input_statement",
"name": "STACK"
}],
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": "%{BKY_TEXT_CREATE_JOIN_TOOLTIP}",
"enableContextMenu": false
},
@@ -85,7 +85,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"message0": "%{BKY_TEXT_CREATE_JOIN_ITEM_TITLE_ITEM}",
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": "%{BKY_TEXT_CREATE_JOIN_ITEM_TOOLTIP}",
"enableContextMenu": false
},
@@ -103,7 +103,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"extensions": [
"text_append_tooltip"
]
@@ -119,7 +119,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": 'Number',
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": "%{BKY_TEXT_LENGTH_TOOLTIP}",
"helpUrl": "%{BKY_TEXT_LENGTH_HELPURL}"
},
@@ -134,7 +134,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": 'Boolean',
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": "%{BKY_TEXT_ISEMPTY_TOOLTIP}",
"helpUrl": "%{BKY_TEXT_ISEMPTY_HELPURL}"
},
@@ -168,7 +168,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "Number",
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"helpUrl": "%{BKY_TEXT_INDEXOF_HELPURL}",
"inputsInline": true,
"extensions": [
@@ -197,7 +197,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": "String",
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"helpUrl": "%{BKY_TEXT_CHARAT_HELPURL}",
"inputsInline": true,
"mutator": "text_charAt_mutator"
@@ -221,7 +221,7 @@ Blockly.Blocks['text_getSubstring'] = {
[Blockly.Msg['TEXT_GET_SUBSTRING_END_LAST'], 'LAST']
];
this.setHelpUrl(Blockly.Msg['TEXT_GET_SUBSTRING_HELPURL']);
this.setStyle(Blockly.Msg['TEXT_STYLE']);
this.setStyle("text");
this.appendValueInput('STRING')
.setCheck('String')
.appendField(Blockly.Msg['TEXT_GET_SUBSTRING_INPUT_IN_TEXT']);
@@ -329,7 +329,7 @@ Blockly.Blocks['text_changeCase'] = {
[Blockly.Msg['TEXT_CHANGECASE_OPERATOR_TITLECASE'], 'TITLECASE']
];
this.setHelpUrl(Blockly.Msg['TEXT_CHANGECASE_HELPURL']);
this.setStyle(Blockly.Msg['TEXT_STYLE']);
this.setStyle("text");
this.appendValueInput('TEXT')
.setCheck('String')
.appendField(new Blockly.FieldDropdown(OPERATORS), 'CASE');
@@ -350,7 +350,7 @@ Blockly.Blocks['text_trim'] = {
[Blockly.Msg['TEXT_TRIM_OPERATOR_RIGHT'], 'RIGHT']
];
this.setHelpUrl(Blockly.Msg['TEXT_TRIM_HELPURL']);
this.setStyle(Blockly.Msg['TEXT_STYLE']);
this.setStyle("text");
this.appendValueInput('TEXT')
.setCheck('String')
.appendField(new Blockly.FieldDropdown(OPERATORS), 'MODE');
@@ -375,7 +375,7 @@ Blockly.Blocks['text_print'] = {
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": Blockly.Msg['TEXT_PRINT_TOOLTIP'],
"helpUrl": Blockly.Msg['TEXT_PRINT_HELPURL']
});
@@ -393,7 +393,7 @@ Blockly.Blocks['text_prompt_ext'] = {
[Blockly.Msg['TEXT_PROMPT_TYPE_NUMBER'], 'NUMBER']
];
this.setHelpUrl(Blockly.Msg['TEXT_PROMPT_HELPURL']);
this.setStyle(Blockly.Msg['TEXT_STYLE']);
this.setStyle("text");
// Assign 'this' to a variable for use in the closures below.
var thisBlock = this;
var dropdown = new Blockly.FieldDropdown(TYPES, function(newOp) {
@@ -453,7 +453,7 @@ Blockly.Blocks['text_prompt'] = {
// Assign 'this' to a variable for use in the closures below.
var thisBlock = this;
this.setHelpUrl(Blockly.Msg['TEXT_PROMPT_HELPURL']);
this.setStyle(Blockly.Msg['TEXT_STYLE']);
this.setStyle("text");
var dropdown = new Blockly.FieldDropdown(TYPES, function(newOp) {
thisBlock.updateType_(newOp);
});
@@ -496,7 +496,7 @@ Blockly.Blocks['text_count'] = {
],
"output": "Number",
"inputsInline": true,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": Blockly.Msg['TEXT_COUNT_TOOLTIP'],
"helpUrl": Blockly.Msg['TEXT_COUNT_HELPURL']
});
@@ -530,7 +530,7 @@ Blockly.Blocks['text_replace'] = {
],
"output": "String",
"inputsInline": true,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": Blockly.Msg['TEXT_REPLACE_TOOLTIP'],
"helpUrl": Blockly.Msg['TEXT_REPLACE_HELPURL']
});
@@ -554,7 +554,7 @@ Blockly.Blocks['text_reverse'] = {
],
"output": "String",
"inputsInline": true,
"style": "%{BKY_TEXT_STYLE}",
"style": "text",
"tooltip": Blockly.Msg['TEXT_REVERSE_TOOLTIP'],
"helpUrl": Blockly.Msg['TEXT_REVERSE_HELPURL']
});

View File

@@ -55,7 +55,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
}
],
"output": null,
"style": "%{BKY_VARIABLES_STYLE}",
"style": "variables",
"helpUrl": "%{BKY_VARIABLES_GET_HELPURL}",
"tooltip": "%{BKY_VARIABLES_GET_TOOLTIP}",
"extensions": ["contextMenu_variableSetterGetter"]
@@ -77,7 +77,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_VARIABLES_STYLE}",
"style": "variables",
"tooltip": "%{BKY_VARIABLES_SET_TOOLTIP}",
"helpUrl": "%{BKY_VARIABLES_SET_HELPURL}",
"extensions": ["contextMenu_variableSetterGetter"]

View File

@@ -52,7 +52,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
"variable": "%{BKY_VARIABLES_DEFAULT_NAME}"
}],
"output": null,
"style": "%{BKY_VARIABLES_DYNAMIC_STYLE}",
"style": "variables_dynamic",
"helpUrl": "%{BKY_VARIABLES_GET_HELPURL}",
"tooltip": "%{BKY_VARIABLES_GET_TOOLTIP}",
"extensions": ["contextMenu_variableDynamicSetterGetter"]
@@ -73,7 +73,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT
],
"previousStatement": null,
"nextStatement": null,
"style": "%{BKY_VARIABLES_DYNAMIC_STYLE}",
"style": "variables_dynamic",
"tooltip": "%{BKY_VARIABLES_SET_TOOLTIP}",
"helpUrl": "%{BKY_VARIABLES_SET_HELPURL}",
"extensions": ["contextMenu_variableDynamicSetterGetter"]