summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorViraj Mahesh <virajmahesh@gmail.com>2014-02-28 16:54:00 -0800
committerViraj Mahesh <virajmahesh@gmail.com>2014-02-28 16:54:00 -0800
commitd591b743e4fade85b2b15af8a0c37d32f700cdd2 (patch)
treef10633abe979faace823e61b544115aa4ac425e8 /objects.js
parente889dc224e68a634e1ecfc64d39f5b5432c4322e (diff)
downloadsnap-d591b743e4fade85b2b15af8a0c37d32f700cdd2.tar.gz
snap-d591b743e4fade85b2b15af8a0c37d32f700cdd2.zip
Screenshot block now mentions that it saves the screenshot as a costume
Screenshot block now accepts a string
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/objects.js b/objects.js
index 1c55231..d3fbbec 100644
--- a/objects.js
+++ b/objects.js
@@ -812,7 +812,8 @@ SpriteMorph.prototype.initBlocks = function () {
doScreenshot: {
type: 'command',
category: 'sensing',
- spec: 'save a screenshot to'
+ spec: 'save screenshot as costume named %s',
+ defaults: ['screenshot']
},
// Operators
@@ -3702,11 +3703,11 @@ SpriteMorph.prototype.reactToDropOf = function (morph, hand) {
morph.slideBackTo(hand.grabOrigin);
};
-SpriteMorph.prototype.doScreenshot = function() {
+SpriteMorph.prototype.doScreenshot = function(data) {
var stage = this.parentThatIsA(StageMorph);
var canvas = stage.fullImageClassic();
var ide = this.parentThatIsA(IDE_Morph);
- var costume = new Costume(canvas, "");
+ var costume = new Costume(canvas, data);
ide.currentSprite.addCostume(costume);
};