feat(boards): python3下turtle添加 stamp 方法

This commit is contained in:
王立帮
2025-09-30 11:46:18 +08:00
parent 3aa8d53c11
commit 757f0f29ac
8 changed files with 43 additions and 3 deletions

View File

@@ -171,7 +171,6 @@ export const turtle_setxy = {
};
export const turtle_pos_shape = {
init: function () {
this.setColour(TURTLE_HUE);
var pos_shape =
@@ -200,6 +199,18 @@ export const turtle_pos_shape = {
}
};
export const turtle_stamp = {
init: function () {
this.setColour(TURTLE_HUE);
this.appendValueInput('TUR')
.setCheck('Turtle')
this.appendDummyInput()
.appendField(Blockly.Msg.TURTLE_STAMP);
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);
}
};
export const turtle_clear = {
init: function () {
@@ -211,8 +222,6 @@ export const turtle_clear = {
this.setColour(TURTLE_HUE);
this.appendDummyInput("")
.appendField(new Blockly.FieldDropdown(clear_reset), 'DIR')
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);