From acc40a6d2a06ab1fcfbd488030e091bd9215a1b2 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 18 Jun 2013 18:43:15 +0200 Subject: Code mapping generating text code from blocks, first experimental iteration --- gui.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gui.js') 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', -- cgit v1.3.1