summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-06-18 18:43:15 +0200
committerjmoenig <jens@moenig.org>2013-06-18 18:43:15 +0200
commitacc40a6d2a06ab1fcfbd488030e091bd9215a1b2 (patch)
tree57374704c2b908df2c1d8721f8a055a0f1378d1e /gui.js
parenta7ebff7c5bb4a79b3a64441b50957e523fe686e0 (diff)
downloadsnap-acc40a6d2a06ab1fcfbd488030e091bd9215a1b2.tar.gz
snap-acc40a6d2a06ab1fcfbd488030e091bd9215a1b2.zip
Code mapping
generating text code from blocks, first experimental iteration
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/gui.js b/gui.js
index f8c688d..df6c5e7 100644
--- a/gui.js
+++ b/gui.js
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-May-17';
+modules.gui = '2013-June-18';
// Declarations
@@ -2148,6 +2148,20 @@ IDE_Morph.prototype.settingsMenu = function () {
'check for alternative\nGUI design',
false
);
+ addPreference(
+ 'Code mapping',
+ function () {
+ StageMorph.prototype.enableCodeMapping =
+ !StageMorph.prototype.enableCodeMapping;
+ myself.currentSprite.blocksCache.variables = null;
+ myself.currentSprite.paletteCache.variables = null;
+ myself.refreshPalette();
+ },
+ StageMorph.prototype.enableCodeMapping,
+ 'uncheck to disable\nblock to text mapping features',
+ 'check for block\nto text mapping features',
+ false
+ );
menu.addLine(); // everything below this line is made persistent
addPreference(
'Thread safe scripts',