mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
add new typed variable (#4352)
* add new typed variable * add typed variables to the prompt message
This commit is contained in:
committed by
GitHub
parent
9bafa7e40d
commit
b48d3a6dd3
@@ -362,6 +362,11 @@ StandardCategories.categoryMap['variables'] =
|
||||
StandardCategories.categoryMap['variables'].hue = 330;
|
||||
StandardCategories.categoryMap['variables'].custom = 'VARIABLE';
|
||||
|
||||
StandardCategories.categoryMap['typedvariables'] =
|
||||
new ListElement(ListElement.TYPE_CATEGORY, 'TypedVariables');
|
||||
StandardCategories.categoryMap['typedvariables'].custom = 'VARIABLE_DYNAMIC';
|
||||
StandardCategories.categoryMap['typedvariables'].hue = 290;
|
||||
|
||||
// All standard block types in provided in Blockly core.
|
||||
StandardCategories.coreBlockTypes = ["controls_if", "logic_compare",
|
||||
"logic_operation", "logic_negate", "logic_boolean", "logic_null",
|
||||
|
||||
@@ -550,7 +550,8 @@ WorkspaceFactoryController.prototype.loadCategory = function() {
|
||||
// Prompt user for the name of the standard category to load.
|
||||
do {
|
||||
var name = prompt('Enter the name of the category you would like to import '
|
||||
+ '(Logic, Loops, Math, Text, Lists, Colour, Variables, or Functions)');
|
||||
+ '(Logic, Loops, Math, Text, Lists, Colour, Variables, TypedVariables '
|
||||
+ 'or Functions)');
|
||||
if (!name) {
|
||||
return; // Exit if cancelled.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user