Skip to content

Commit

Permalink
add monitors to existing blocks in the palette
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGamer13 committed Oct 27, 2024
1 parent b9ca2e0 commit 4456da6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions blocks_vertical/looks.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ Blockly.Blocks['looks_tintColor'] = {
this.jsonInit({
"message0": "tint color",
"category": Blockly.Categories.looks,
"checkboxInFlyout": true,
"extensions": ["colours_looks", "output_string"]
});
}
Expand Down Expand Up @@ -784,6 +785,7 @@ Blockly.Blocks["looks_layersGetLayer"] = {
"inputsInline": true,
"category": "looks",
"message0": "layer",
"checkboxInFlyout": true,
"extensions": [
"output_number",
"colours_looks"
Expand Down Expand Up @@ -918,6 +920,7 @@ Blockly.Blocks["looks_stretchGetX"] = {
init: function() {
this.jsonInit({
"inputsInline": true,
"checkboxInFlyout": true,
"category": "looks",
"message0": "x stretch",
"extensions": [
Expand All @@ -932,6 +935,7 @@ Blockly.Blocks["looks_stretchGetY"] = {
init: function() {
this.jsonInit({
"inputsInline": true,
"checkboxInFlyout": true,
"category": "looks",
"message0": "y stretch",
"extensions": [
Expand All @@ -948,6 +952,7 @@ Blockly.Blocks["looks_getSpriteVisible"] = {
"inputsInline": true,
"category": "looks",
"message0": "visible?",
"checkboxInFlyout": true,
"extensions": [
"output_boolean",
"colours_looks"
Expand Down Expand Up @@ -1004,6 +1009,7 @@ Blockly.Blocks["looks_getEffectValue"] = {
"inputsInline": true,
"category": "looks",
"message0": "%1 effect",
"checkboxInFlyout": true,
"args0": [
{
"type": "field_dropdown",
Expand Down Expand Up @@ -1038,6 +1044,7 @@ Blockly.Blocks["looks_sayHeight"] = {
"inputsInline": true,
"category": "looks",
"message0": "bubble height",
"checkboxInFlyout": true,
"extensions": [
"output_string",
"colours_looks"
Expand All @@ -1052,6 +1059,7 @@ Blockly.Blocks["looks_sayWidth"] = {
"inputsInline": true,
"category": "looks",
"message0": "bubble width",
"checkboxInFlyout": true,
"extensions": [
"output_string",
"colours_looks"
Expand Down
10 changes: 9 additions & 1 deletion blocks_vertical/sensing.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ Blockly.Blocks['sensing_mousedown'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_MOUSEDOWN,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_boolean"]
});
}
Expand All @@ -457,6 +458,7 @@ Blockly.Blocks['sensing_mouseclicked'] = {
this.jsonInit({
"message0": "mouse clicked?",
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_boolean"]
});
}
Expand Down Expand Up @@ -511,6 +513,7 @@ Blockly.Blocks['sensing_mousex'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_MOUSEX,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_number"]
});
}
Expand All @@ -525,6 +528,7 @@ Blockly.Blocks['sensing_mousey'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_MOUSEY,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_number"]
});
}
Expand Down Expand Up @@ -599,6 +603,7 @@ Blockly.Blocks['sensing_getclipboard'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_CLIPBOARDITEM,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_string"]
});
}
Expand Down Expand Up @@ -668,6 +673,7 @@ Blockly.Blocks['sensing_loud'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_LOUD,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_boolean"]
});
}
Expand Down Expand Up @@ -804,6 +810,7 @@ Blockly.Blocks['sensing_dayssince2000'] = {
this.jsonInit({
"message0": Blockly.Msg.SENSING_DAYSSINCE2000,
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_number"]
});
}
Expand All @@ -826,13 +833,14 @@ Blockly.Blocks['sensing_username'] = {

Blockly.Blocks['sensing_loggedin'] = {
/**
* Block to report user's username
* pm: Block to report if a user is logged in.
* @this Blockly.Block
*/
init: function () {
this.jsonInit({
"message0": 'logged in?',
"category": Blockly.Categories.sensing,
"checkboxInFlyout": true,
"extensions": ["colours_sensing", "output_boolean"]
});
}
Expand Down
1 change: 1 addition & 0 deletions blocks_vertical/sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ Blockly.Blocks['sound_getEffectValue'] = {
this.jsonInit({
"inputsInline": true,
"message0": "%1 effect",
"checkboxInFlyout": true,
"category": Blockly.Categories.sound,
"args0": [
{
Expand Down

0 comments on commit 4456da6

Please sign in to comment.