mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-01 17:11:21 -04:00
VM changes for the sensing_of block. This handles lists properly (by ignoring them like Scratch2 and makes the attribute menu update based on what was chosen in the target menu.
This commit is contained in:
parent
631d44a061
commit
f214d3a191
5 changed files with 59 additions and 5 deletions
src/engine
|
@ -613,6 +613,14 @@ class Runtime extends EventEmitter {
|
|||
return 'RUNTIME_STARTED';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name for reporting that a block was updated and needs to be rerendered.
|
||||
* @const {string}
|
||||
*/
|
||||
static get BLOCKS_NEED_UPDATE () {
|
||||
return 'BLOCKS_NEED_UPDATE';
|
||||
}
|
||||
|
||||
/**
|
||||
* How rapidly we try to step threads by default, in ms.
|
||||
*/
|
||||
|
@ -2169,6 +2177,13 @@ class Runtime extends EventEmitter {
|
|||
this._refreshTargets = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit an event that indicate that the blocks on the workspace need updating.
|
||||
*/
|
||||
requestBlocksUpdate () {
|
||||
this.emit(Runtime.BLOCK_NEED_UPDATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up timers to repeatedly step in a browser.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue