Skip to content

Commit

Permalink
Implement sensing_setdragmode
Browse files Browse the repository at this point in the history
  • Loading branch information
valadaptive committed May 30, 2024
1 parent 0f315f6 commit 8342b1e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,17 @@ export const sensing_mousey = new ProtoBlock({
colorCategory: 'sensing',
});

export const sensing_setdragmode = new ProtoBlock({
opcode: 'sensing_setdragmode',
inputs: {
DRAG_MODE: StringField,
},
execute: function* ({DRAG_MODE}, ctx) {
ctx.target.draggable = DRAG_MODE === 'draggable';
},
colorCategory: 'sensing',
});

export const sensing_loudness = new ProtoBlock({
opcode: 'sensing_loudness',
inputs: {},
Expand Down

0 comments on commit 8342b1e

Please sign in to comment.