add new typed variable (#4352)

* add new typed variable

* add typed variables to the prompt message
This commit is contained in:
Halit Anil Donmez
2020-10-07 14:07:35 -04:00
committed by GitHub
parent 9bafa7e40d
commit b48d3a6dd3
2 changed files with 7 additions and 1 deletions

View File

@@ -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",

View File

@@ -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.
}