mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Enable extension monitors, add flag to disable
Extension reporters now offer a monitor checkbox by default, unless the `disableMonitor` flag is set in the extension block metadata.
This commit is contained in:
parent
b41423bdfa
commit
701fb6c1c5
2 changed files with 4 additions and 0 deletions
|
@ -745,6 +745,9 @@ class Runtime extends EventEmitter {
|
||||||
case BlockType.REPORTER:
|
case BlockType.REPORTER:
|
||||||
blockJSON.output = 'String'; // TODO: distinguish number & string here?
|
blockJSON.output = 'String'; // TODO: distinguish number & string here?
|
||||||
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND;
|
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_ROUND;
|
||||||
|
if (!blockInfo.disableMonitor) {
|
||||||
|
blockJSON.checkboxInFlyout = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BlockType.BOOLEAN:
|
case BlockType.BOOLEAN:
|
||||||
blockJSON.output = 'Boolean';
|
blockJSON.output = 'Boolean';
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* @property {string} text - the text on the block, with [PLACEHOLDERS] for arguments.
|
* @property {string} text - the text on the block, with [PLACEHOLDERS] for arguments.
|
||||||
* @property {Boolean} [hideFromPalette] - true if this block should not appear in the block palette.
|
* @property {Boolean} [hideFromPalette] - true if this block should not appear in the block palette.
|
||||||
* @property {Boolean} [isTerminal] - true if the block ends a stack - no blocks can be connected after it.
|
* @property {Boolean} [isTerminal] - true if the block ends a stack - no blocks can be connected after it.
|
||||||
|
* @property {Boolean} [disableMonitor] - true if this block is a reporter but should not allow a monitor.
|
||||||
* @property {ReporterScope} [reporterScope] - if this block is a reporter, this is the scope/context for its value.
|
* @property {ReporterScope} [reporterScope] - if this block is a reporter, this is the scope/context for its value.
|
||||||
* @property {Boolean} [isEdgeActivated] - sets whether a hat block is edge-activated.
|
* @property {Boolean} [isEdgeActivated] - sets whether a hat block is edge-activated.
|
||||||
* @property {Boolean} [shouldRestartExistingThreads] - sets whether a hat/event block should restart existing threads.
|
* @property {Boolean} [shouldRestartExistingThreads] - sets whether a hat/event block should restart existing threads.
|
||||||
|
|
Loading…
Reference in a new issue