summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-01-25 16:30:56 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-01-25 16:30:56 +0100
commit5e25b1303319269ee44821d2a9592a441aa86cee (patch)
tree4cac497aec68491f7b65e6cc92bfa2782fa6d519 /gui.js
parent2ca378c50bf67b6af5e16ba72af81f4f84db308c (diff)
downloadsnap-byow-5e25b1303319269ee44821d2a9592a441aa86cee.tar.gz
snap-byow-5e25b1303319269ee44821d2a9592a441aa86cee.zip
first working version, WIP
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/gui.js b/gui.js
index 73fffe9..ee5cd60 100644
--- a/gui.js
+++ b/gui.js
@@ -212,7 +212,7 @@ IDE_Morph.prototype.init = function (isAutoFill) {
this.globalVariables = new VariableFrame();
this.currentSprite = new SpriteMorph(this.globalVariables);
this.sprites = new List([this.currentSprite]);
- this.currentCategory = 'motion';
+ this.currentCategory = 'player';
this.currentTab = 'scripts';
this.projectName = '';
this.projectNotes = '';
@@ -3370,6 +3370,21 @@ IDE_Morph.prototype.toggleAppMode = function (appMode) {
}
}
this.setExtent(this.world().extent()); // resume trackChanges
+
+ /* BYOW changes */
+ if (this.isAppMode) {
+ document.body.appendChild(window.gameWorld);
+ document.getElementById('world').style.display = 'none';
+ } else {
+ for (j = 0; j < document.body.children.length; j++) {
+ // TODO refactor
+ if (document.body.children[j] == window.gameWorld) {
+ document.body.removeChild(window.gameWorld);
+ break;
+ }
+ }
+ document.getElementById('world').style.display = null;
+ }
};
IDE_Morph.prototype.toggleStageSize = function (isSmall) {