From 30caffbf02a54f73697f8f62e3e3f31f3a55db2f Mon Sep 17 00:00:00 2001 From: Bernat Romagosa Date: Fri, 10 Apr 2015 13:18:03 +0200 Subject: [PATCH] new parameters to allow embedding projects --- gui.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gui.js b/gui.js index 04481cc7..4f3a9a6c 100644 --- a/gui.js +++ b/gui.js @@ -364,8 +364,21 @@ IDE_Morph.prototype.openIn = function (world) { myself.shield.destroy(); myself.shield = null; msg.destroy(); - myself.toggleAppMode(true); - myself.runScripts(); + + if (dict.editMode) { + myself.toggleAppMode(false); + } else { + myself.toggleAppMode(true); + } + + if (!dict.noRun) { + myself.runScripts(); + } + + if (dict.hideControls) { + myself.controlBar.hide(); + window.onbeforeunload = function (evt) {}; + } } ]); },