Skip to content

Commit acd2813

Browse files
committed
add Shadow true blocks
1 parent 5de62ad commit acd2813

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/blocks/mrc_steps.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,21 @@ const STEPS = {
212212
const fieldFlydown = createStepFieldFlydown(stepName, true);
213213
fieldFlydown.setValidator(this.mrcUpdateStepName.bind(this, j));
214214

215-
this.appendValueInput('CONDITION_' + j)
215+
const conditionInput = this.appendValueInput('CONDITION_' + j)
216216
.appendField(fieldFlydown)
217217
.setCheck('Boolean')
218218
.appendField(Blockly.Msg.REPEAT_UNTIL);
219219
this.appendStatementInput('STEP_' + j);
220+
221+
// Add shadow True block to the new condition input
222+
if (this.workspace) {
223+
const shadowBlock = this.workspace.newBlock('logic_boolean') as Blockly.BlockSvg;
224+
shadowBlock.setShadow(true);
225+
shadowBlock.setFieldValue('TRUE', 'BOOL');
226+
shadowBlock.initSvg();
227+
shadowBlock.render();
228+
conditionInput.connection?.connect(shadowBlock.outputConnection!);
229+
}
220230
}
221231
}
222232

0 commit comments

Comments
 (0)