Skip to content

Commit

Permalink
feat: add shadow blocks for connection checks and real colour block (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maribethb authored Apr 3, 2024
1 parent 96bdd32 commit 750aa45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/developer-tools/src/blocks/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ const updateTypeInputs = function (
): undefined {
if (inputsWithConnectionCheckInputs.has(value)) {
if (!this.getInput('CHECK')) {
this.appendValueInput('CHECK')
const input = this.appendValueInput('CHECK')
.setCheck(['ConnectionCheckArray', 'ConnectionCheck'])
.setAlign(Blockly.inputs.Align.RIGHT)
.appendField('connection check');
input.connection.setShadowState({
type: 'connection_check',
fields: {
CHECKDROPDOWN: 'null',
},
});
}
} else {
this.removeInput('CHECK', true);
Expand Down
8 changes: 8 additions & 0 deletions examples/developer-tools/src/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ function createStartBlock(name: string): object {
},
},
},
COLOUR: {
block: {
type: 'colour_hue',
fields: {
HUE: 230,
},
},
},
},
},
],
Expand Down

0 comments on commit 750aa45

Please sign in to comment.