summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-08 17:19:10 +0200
committerjmoenig <jens@moenig.org>2013-04-08 17:19:10 +0200
commit0c4cedad05713aed3340c3d89a2e0c82fc87af40 (patch)
tree2315a36e3c7f9a71c55e468cadac93ca6a673472 /objects.js
parenta39f4fbffcc5503412dcf7f0b309715918323ba9 (diff)
downloadsnap-byow-0c4cedad05713aed3340c3d89a2e0c82fc87af40.tar.gz
snap-byow-0c4cedad05713aed3340c3d89a2e0c82fc87af40.zip
Turn pen trails into new costume
currently still hidden in the stage's context menu, visible when shift-clicked
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 51cdc7b..7ebdccf 100644
--- a/objects.js
+++ b/objects.js
@@ -120,7 +120,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2013-March-25';
+modules.objects = '2013-April-08';
var SpriteMorph;
var StageMorph;
@@ -3897,6 +3897,7 @@ StageMorph.prototype.clear = function () {
StageMorph.prototype.userMenu = function () {
var ide = this.parentThatIsA(IDE_Morph),
menu = new MenuMorph(this),
+ shiftClicked = this.world().currentKey === 16,
myself = this;
if (ide && ide.isAppMode) {
@@ -3912,6 +3913,24 @@ StageMorph.prototype.userMenu = function () {
},
'open a new window\nwith a picture of the stage'
);
+ if (shiftClicked) {
+ menu.addLine();
+ menu.addItem(
+ "turn pen trails into new costume...",
+ function () {
+ var costume = new Costume(
+ myself.trailsCanvas,
+ Date.now().toString()
+ ).copy();
+ ide.currentSprite.addCostume(costume);
+ ide.currentSprite.wearCostume(costume);
+ ide.hasChangedMedia = true;
+ },
+ 'turn all pen trails and stamps\n' +
+ 'into a new costume for the\ncurrently selected sprite',
+ new Color(100, 0, 0)
+ );
+ }
return menu;
};