summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-07-30 13:48:12 +0200
committerjmoenig <jens@moenig.org>2013-07-30 13:48:12 +0200
commit15914663173d092dba5498a693c921d94e1aa562 (patch)
treef7afd57f52544775d4ffd7dd8591a6bc0b64d9a2 /objects.js
parent20c1d4d14f3dfb6a50d6d1be3dc47a4ca9cf5921 (diff)
downloadsnap-15914663173d092dba5498a693c921d94e1aa562.tar.gz
snap-15914663173d092dba5498a693c921d94e1aa562.zip
PAUSE primitive command block
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js19
1 files changed, 17 insertions, 2 deletions
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') {