diff options
| author | jmoenig <jens@moenig.org> | 2013-07-30 13:48:12 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-07-30 13:48:12 +0200 |
| commit | 15914663173d092dba5498a693c921d94e1aa562 (patch) | |
| tree | f7afd57f52544775d4ffd7dd8591a6bc0b64d9a2 /objects.js | |
| parent | 20c1d4d14f3dfb6a50d6d1be3dc47a4ca9cf5921 (diff) | |
| download | snap-byow-15914663173d092dba5498a693c921d94e1aa562.tar.gz snap-byow-15914663173d092dba5498a693c921d94e1aa562.zip | |
PAUSE primitive command block
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -123,7 +123,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2013-July-15'; +modules.objects = '2013-July-30'; var SpriteMorph; var StageMorph; @@ -662,6 +662,14 @@ SpriteMorph.prototype.initBlocks = function () { spec: 'delete this clone' }, + // Debugging - pausing + + doPauseAll: { + type: 'command', + category: 'control', + spec: 'pause all %pause' + }, + // Sensing reportTouchingObject: { @@ -1613,6 +1621,8 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('receiveOnClone')); blocks.push(block('createClone')); blocks.push(block('removeClone')); + blocks.push('-'); + blocks.push(block('doPauseAll')); } else if (cat === 'sensing') { @@ -3701,7 +3711,10 @@ StageMorph.prototype.fireStopAllEvent = function () { }); this.removeAllClones(); if (ide) { - ide.controlBar.pauseButton.refresh(); + ide.nextSteps([ + nop, + function () {ide.controlBar.pauseButton.refresh(); } + ]); } }; @@ -3878,6 +3891,8 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push(block('reportCallCC')); blocks.push('-'); blocks.push(block('createClone')); + blocks.push('-'); + blocks.push(block('doPauseAll')); } else if (cat === 'sensing') { |
