Skip to content

Commit

Permalink
Merge branch 'develop' into develop-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jan 11, 2024
2 parents c8bf11c + 86186a4 commit 11ec51a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion blocks_vertical/vertical_extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,18 @@ Blockly.ScratchBlocks.VerticalExtensions.PROCEDURE_CALL_CONTEXTMENU = {
}
};

Blockly.ScratchBlocks.VerticalExtensions.FROM_EXTENSION = function() {
this.isFromExtension = true;
};

Blockly.ScratchBlocks.VerticalExtensions.DEFAULT_EXTENSION_COLORS = function() {
this.usesDefaultExtensionColors = true;
};

Blockly.ScratchBlocks.VerticalExtensions.SCRATCH_EXTENSION = function() {
this.isScratchExtension = true;
};

/**
* Register all extensions for scratch-blocks.
* @package
Expand Down Expand Up @@ -265,7 +273,15 @@ Blockly.ScratchBlocks.VerticalExtensions.registerAll = function() {
Blockly.Extensions.registerMixin('procedure_call_contextmenu',
Blockly.ScratchBlocks.VerticalExtensions.PROCEDURE_CALL_CONTEXTMENU);

// Extension blocks have slightly different block rendering.
// Given to all blocks from an extension.
Blockly.Extensions.register('from_extension',
Blockly.ScratchBlocks.VerticalExtensions.FROM_EXTENSION);

// Given to blocks that use the default extension colors ("pen")
Blockly.Extensions.register('default_extension_colors',
Blockly.ScratchBlocks.VerticalExtensions.DEFAULT_EXTENSION_COLORS);

// Misleading name. Given to blocks that have an extension icon.
Blockly.Extensions.register('scratch_extension',
Blockly.ScratchBlocks.VerticalExtensions.SCRATCH_EXTENSION);
};
Expand Down

0 comments on commit 11ec51a

Please sign in to comment.