allow per-block colors

This commit is contained in:
Christopher Willis-Ford committed 2019-06-18 11:24:29 -07:00
1 parent 86edd829c0
commit d19c468336
1 file changed
+5
+5
View File
@@ -76,6 +76,11 @@ const defineDynamicBlock = (ScratchBlocks, categoryInfo, staticBlockInfo, extend
break;
}
if (blockInfo.color1 || blockInfo.color2 || blockInfo.color3) {
// `setColour` handles undefined parameters by adjusting defined colors
this.setColour(blockInfo.color1, blockInfo.color2, blockInfo.color3);
}
// Layout block arguments
// TODO handle E/C Blocks
const blockText = blockInfo.text;