summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-03-22 11:33:34 +0100
committerjmoenig <jens@moenig.org>2013-03-22 11:33:34 +0100
commit2c54645400bb6afe6ae4dea1f714dabc8c886708 (patch)
tree0a37ae90ad5478f82eb95fa00a0f5625fd0ce9a5
parent408ed6285d1431c3e1667470e8839818e7509415 (diff)
downloadsnap-2c54645400bb6afe6ae4dea1f714dabc8c886708.tar.gz
snap-2c54645400bb6afe6ae4dea1f714dabc8c886708.zip
Stage screenshots
the stage's context menu, and likewise the stage icon's context menu in the corral, now let you export a screenshot of the stage including all pen trails, sprites, watchers and speech bubbles
-rw-r--r--gui.js13
-rwxr-xr-xhistory.txt3
-rw-r--r--lang-de.js4
-rw-r--r--objects.js10
4 files changed, 27 insertions, 3 deletions
diff --git a/gui.js b/gui.js
index 746746a..4ecb643 100644
--- a/gui.js
+++ b/gui.js
@@ -4172,7 +4172,18 @@ SpriteIconMorph.prototype.fixLayout = function () {
// SpriteIconMorph menu
SpriteIconMorph.prototype.userMenu = function () {
- var menu = new MenuMorph(this);
+ var menu = new MenuMorph(this),
+ myself = this;
+ if (this.object instanceof StageMorph) {
+ menu.addItem(
+ 'pic...',
+ function () {
+ window.open(myself.object.fullImageClassic().toDataURL());
+ },
+ 'open a new window\nwith a picture of the stage'
+ );
+ return menu;
+ }
if (!(this.object instanceof SpriteMorph)) {return null; }
menu.addItem("show", 'showSpriteOnStage');
menu.addLine();
diff --git a/history.txt b/history.txt
index 772dfeb..ef221fd 100755
--- a/history.txt
+++ b/history.txt
@@ -1556,4 +1556,5 @@ ______
* Widgets: optional sliders and "lively" graphics for numerical prompters
* Blocks, GUI: "Zoom blocks…" feature in the settings menu (no longer hidden)
* Objects: numeric prompters for watcher's sliderMin/Max
-* translation updates \ No newline at end of file
+* translation updates
+* Objects: 'pic...' screenshot feature for the stage \ No newline at end of file
diff --git a/lang-de.js b/lang-de.js
index 52eb3ac..230d2af 100644
--- a/lang-de.js
+++ b/lang-de.js
@@ -791,6 +791,10 @@ SnapTranslator.dict.de = {
// stage:
'show all':
'Alles zeigen',
+ 'pic...':
+ 'Bild exportieren...',
+ 'open a new window\nwith a picture of the stage':
+ 'ein neues Browserfenster mit einem\nBild der B\u00fchne \u00f6ffnen',
// scripting area
'clean up':
diff --git a/objects.js b/objects.js
index e7cf9cd..18b4027 100644
--- a/objects.js
+++ b/objects.js
@@ -3896,7 +3896,8 @@ StageMorph.prototype.clear = function () {
StageMorph.prototype.userMenu = function () {
var ide = this.parentThatIsA(IDE_Morph),
- menu = new MenuMorph(this);
+ menu = new MenuMorph(this),
+ myself = this;
if (ide && ide.isAppMode) {
menu.addItem('help', 'nop');
@@ -3904,6 +3905,13 @@ StageMorph.prototype.userMenu = function () {
}
menu.addItem("edit", 'edit');
menu.addItem("show all", 'showAll');
+ menu.addItem(
+ "pic...",
+ function () {
+ window.open(myself.fullImageClassic().toDataURL());
+ },
+ 'open a new window\nwith a picture of the stage'
+ );
return menu;
};