diff options
| author | Viraj Mahesh <virajmahesh@gmail.com> | 2014-02-28 16:54:00 -0800 |
|---|---|---|
| committer | Viraj Mahesh <virajmahesh@gmail.com> | 2014-02-28 16:54:00 -0800 |
| commit | d591b743e4fade85b2b15af8a0c37d32f700cdd2 (patch) | |
| tree | f10633abe979faace823e61b544115aa4ac425e8 /objects.js | |
| parent | e889dc224e68a634e1ecfc64d39f5b5432c4322e (diff) | |
| download | snap-yow-d591b743e4fade85b2b15af8a0c37d32f700cdd2.tar.gz snap-yow-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.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); }; |
