diff --git a/editor.html b/editor.html index 59b547a0..aa7cae58 100644 --- a/editor.html +++ b/editor.html @@ -190,7 +190,7 @@

{{ title }}

Blockly
-
@@ -363,7 +363,9 @@

{{ title }}

'flags': { 'blocks': true, 'snippets': true, - 'share': true + 'share': true, + 'experimental': false, + 'sim': true }, }); diff --git a/python-main.js b/python-main.js index 3473fbe0..cbb19b86 100644 --- a/python-main.js +++ b/python-main.js @@ -300,6 +300,9 @@ function web_editor(config) { if(config.flags.share) { $("#command-share").removeClass('hidden'); } + if(config.flags.sim) { + $("#command-sim").removeClass('hidden'); + } }; // This function is called to initialise the editor. It sets things up so @@ -337,6 +340,10 @@ function web_editor(config) { EDITOR.setCode(config.translate.code.start); } EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength()); + // If configured as experimental update editor background to indicate it + if(config.flags.experimental) { + EDITOR.ACE.renderer.scroller.style.backgroundImage = "url('static/img/experimental.png')" + } // Configure the zoom related buttons. $("#zoom-in").click(function (e) { e.stopPropagation();