From 15914663173d092dba5498a693c921d94e1aa562 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 30 Jul 2013 13:48:12 +0200 Subject: PAUSE primitive command block --- objects.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'objects.js') diff --git a/objects.js b/objects.js index 421b207..3c566e9 100644 --- a/objects.js +++ b/objects.js @@ -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') { -- cgit v1.3.1