kopia lustrzana https://github.com/backface/turtlestitch
renamed scene to project again
rodzic
f625f86e27
commit
8878ecb71d
14
src/gui.js
14
src/gui.js
|
@ -5355,22 +5355,22 @@ IDE_Morph.prototype.openProject = function (name) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
IDE_Morph.prototype.switchToScene = function (scene) {
|
IDE_Morph.prototype.switchToScene = function (project) {
|
||||||
var sprites = [];
|
var sprites = [];
|
||||||
if (!scene || !scene.stage) {
|
if (!project || !project.stage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.siblings().forEach(morph =>
|
this.siblings().forEach(morph =>
|
||||||
morph.destroy()
|
morph.destroy()
|
||||||
);
|
);
|
||||||
this.projectName = scene.name;
|
this.projectName = project.name;
|
||||||
this.projectNotes = scene.notes || '';
|
this.projectNotes = project.notes || '';
|
||||||
if (this.globalVariables) {
|
if (this.globalVariables) {
|
||||||
this.globalVariables = scene.globalVariables;
|
this.globalVariables = project.globalVariables;
|
||||||
}
|
}
|
||||||
this.stage.destroy();
|
this.stage.destroy();
|
||||||
this.add(scene.stage);
|
this.add(project.stage);
|
||||||
this.stage = scene.stage;
|
this.stage = project.stage;
|
||||||
sprites = this.stage.children.filter(
|
sprites = this.stage.children.filter(
|
||||||
child => child instanceof SpriteMorph
|
child => child instanceof SpriteMorph
|
||||||
);
|
);
|
||||||
|
|
Ładowanie…
Reference in New Issue