mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 07:29:12 -04:00
add add monitor action
This commit is contained in:
parent
b1355c6b0b
commit
b2e0a632e3
4 changed files with 35 additions and 9 deletions
src/engine
|
@ -87,7 +87,6 @@ const execute = function (sequencer, thread) {
|
|||
} else {
|
||||
// In a non-hat, report the value visually if necessary if
|
||||
// at the top of the thread stack.
|
||||
|
||||
if (typeof resolvedValue !== 'undefined' && thread.atStackTop()) {
|
||||
if (thread.showVisualReport) {
|
||||
runtime.visualReport(currentBlockId, resolvedValue);
|
||||
|
@ -95,15 +94,8 @@ const execute = function (sequencer, thread) {
|
|||
|
||||
if (thread.updateMonitor) {
|
||||
runtime.updateMonitors([{
|
||||
// @todo(dd) this will collide if multiple sprites use same block
|
||||
id: currentBlockId,
|
||||
category: 'data',
|
||||
// @todo(dd) how to handle translation here?
|
||||
label: blockContainer.getOpcode(blockContainer.getBlock(currentBlockId)),
|
||||
value: String(resolvedValue),
|
||||
x: 0,
|
||||
// @todo(dd) place below the last monitor instead
|
||||
y: 0
|
||||
value: String(resolvedValue)
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue