Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Pico Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Cfp committed Nov 6, 2022
1 parent 86d1045 commit 2945d15
Show file tree
Hide file tree
Showing 16 changed files with 12,821 additions and 2,514 deletions.
4 changes: 1 addition & 3 deletions blocks_common/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ Blockly.Blocks['matrix'] = {
"name": "MATRIX"
}
],
"outputShape": Blockly.OUTPUT_SHAPE_ROUND,
"output": "Number",
"extensions": ["colours_pen"]
"category": Blockly.Categories.pico,
});
}
};
144 changes: 72 additions & 72 deletions blocks_vertical/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,81 +379,81 @@ Blockly.Blocks['control_for_each'] = {
}
};

Blockly.Blocks['control_start_as_clone'] = {
/**
* Block for "when I start as a clone" hat.
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"id": "control_start_as_clone",
"message0": Blockly.Msg.CONTROL_STARTASCLONE,
"args0": [
],
"category": Blockly.Categories.control,
"extensions": ["colours_control", "shape_hat"]
});
}
};
// Blockly.Blocks['control_start_as_clone'] = {
// /**
// * Block for "when I start as a clone" hat.
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "id": "control_start_as_clone",
// "message0": Blockly.Msg.CONTROL_STARTASCLONE,
// "args0": [
// ],
// "category": Blockly.Categories.control,
// "extensions": ["colours_control", "shape_hat"]
// });
// }
// };

Blockly.Blocks['control_create_clone_of_menu'] = {
/**
* Create-clone drop-down menu.
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "CLONE_OPTION",
"options": [
[Blockly.Msg.CONTROL_CREATECLONEOF_MYSELF, '_myself_']
]
}
],
"extensions": ["colours_control", "output_string"]
});
}
};
// Blockly.Blocks['control_create_clone_of_menu'] = {
// /**
// * Create-clone drop-down menu.
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": "%1",
// "args0": [
// {
// "type": "field_dropdown",
// "name": "CLONE_OPTION",
// "options": [
// [Blockly.Msg.CONTROL_CREATECLONEOF_MYSELF, '_myself_']
// ]
// }
// ],
// "extensions": ["colours_control", "output_string"]
// });
// }
// };

Blockly.Blocks['control_create_clone_of'] = {
/**
* Block for "create clone of..."
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"id": "control_start_as_clone",
"message0": Blockly.Msg.CONTROL_CREATECLONEOF,
"args0": [
{
"type": "input_value",
"name": "CLONE_OPTION"
}
],
"category": Blockly.Categories.control,
"extensions": ["colours_control", "shape_statement"]
});
}
};
// Blockly.Blocks['control_create_clone_of'] = {
// /**
// * Block for "create clone of..."
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "id": "control_start_as_clone",
// "message0": Blockly.Msg.CONTROL_CREATECLONEOF,
// "args0": [
// {
// "type": "input_value",
// "name": "CLONE_OPTION"
// }
// ],
// "category": Blockly.Categories.control,
// "extensions": ["colours_control", "shape_statement"]
// });
// }
// };

Blockly.Blocks['control_delete_this_clone'] = {
/**
* Block for "delete this clone."
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.CONTROL_DELETETHISCLONE,
"args0": [
],
"category": Blockly.Categories.control,
"extensions": ["colours_control", "shape_end"]
});
}
};
// Blockly.Blocks['control_delete_this_clone'] = {
// /**
// * Block for "delete this clone."
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": Blockly.Msg.CONTROL_DELETETHISCLONE,
// "args0": [
// ],
// "category": Blockly.Categories.control,
// "extensions": ["colours_control", "shape_end"]
// });
// }
// };

Blockly.Blocks['control_get_counter'] = {
/**
Expand Down
176 changes: 88 additions & 88 deletions blocks_vertical/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,53 +101,53 @@ Blockly.Blocks['data_changevariableby'] = {
}
};

Blockly.Blocks['data_showvariable'] = {
/**
* Block to show a variable
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.DATA_SHOWVARIABLE,
"args0": [
{
"type": "field_variable",
"name": "VARIABLE"
}
],
"previousStatement": null,
"nextStatement": null,
"category": Blockly.Categories.data,
"colour": Blockly.Colours.data.primary,
"colourSecondary": Blockly.Colours.data.secondary,
"colourTertiary": Blockly.Colours.data.tertiary
});
}
};

Blockly.Blocks['data_hidevariable'] = {
/**
* Block to hide a variable
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.DATA_HIDEVARIABLE,
"args0": [
{
"type": "field_variable",
"name": "VARIABLE"
}
],
"previousStatement": null,
"nextStatement": null,
"category": Blockly.Categories.data,
"colour": Blockly.Colours.data.primary,
"colourSecondary": Blockly.Colours.data.secondary,
"colourTertiary": Blockly.Colours.data.tertiary
});
}
};
// Blockly.Blocks['data_showvariable'] = {
// /**
// * Block to show a variable
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": Blockly.Msg.DATA_SHOWVARIABLE,
// "args0": [
// {
// "type": "field_variable",
// "name": "VARIABLE"
// }
// ],
// "previousStatement": null,
// "nextStatement": null,
// "category": Blockly.Categories.data,
// "colour": Blockly.Colours.data.primary,
// "colourSecondary": Blockly.Colours.data.secondary,
// "colourTertiary": Blockly.Colours.data.tertiary
// });
// }
// };

// Blockly.Blocks['data_hidevariable'] = {
// /**
// * Block to hide a variable
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": Blockly.Msg.DATA_HIDEVARIABLE,
// "args0": [
// {
// "type": "field_variable",
// "name": "VARIABLE"
// }
// ],
// "previousStatement": null,
// "nextStatement": null,
// "category": Blockly.Categories.data,
// "colour": Blockly.Colours.data.primary,
// "colourSecondary": Blockly.Colours.data.secondary,
// "colourTertiary": Blockly.Colours.data.tertiary
// });
// }
// };

Blockly.Blocks['data_listcontents'] = {
/**
Expand Down Expand Up @@ -457,47 +457,47 @@ Blockly.Blocks['data_listcontainsitem'] = {
}
};

Blockly.Blocks['data_showlist'] = {
/**
* Block to show a list.
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.DATA_SHOWLIST,
"args0": [
{
"type": "field_variable",
"name": "LIST",
"variableTypes": [Blockly.LIST_VARIABLE_TYPE]
}
],
"category": Blockly.Categories.dataLists,
"extensions": ["colours_data_lists", "shape_statement"]
});
}
};

Blockly.Blocks['data_hidelist'] = {
/**
* Block to hide a list.
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"message0": Blockly.Msg.DATA_HIDELIST,
"args0": [
{
"type": "field_variable",
"name": "LIST",
"variableTypes": [Blockly.LIST_VARIABLE_TYPE]
}
],
"category": Blockly.Categories.dataLists,
"extensions": ["colours_data_lists", "shape_statement"]
});
}
};
// Blockly.Blocks['data_showlist'] = {
// /**
// * Block to show a list.
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": Blockly.Msg.DATA_SHOWLIST,
// "args0": [
// {
// "type": "field_variable",
// "name": "LIST",
// "variableTypes": [Blockly.LIST_VARIABLE_TYPE]
// }
// ],
// "category": Blockly.Categories.dataLists,
// "extensions": ["colours_data_lists", "shape_statement"]
// });
// }
// };

// Blockly.Blocks['data_hidelist'] = {
// /**
// * Block to hide a list.
// * @this Blockly.Block
// */
// init: function() {
// this.jsonInit({
// "message0": Blockly.Msg.DATA_HIDELIST,
// "args0": [
// {
// "type": "field_variable",
// "name": "LIST",
// "variableTypes": [Blockly.LIST_VARIABLE_TYPE]
// }
// ],
// "category": Blockly.Categories.dataLists,
// "extensions": ["colours_data_lists", "shape_statement"]
// });
// }
// };

/**
* Mixin to add a context menu for a data_variable block. It adds one item for
Expand Down
Loading

0 comments on commit 2945d15

Please sign in to comment.