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 = [];
|
||||
if (!scene || !scene.stage) {
|
||||
if (!project || !project.stage) {
|
||||
return;
|
||||
}
|
||||
this.siblings().forEach(morph =>
|
||||
morph.destroy()
|
||||
);
|
||||
this.projectName = scene.name;
|
||||
this.projectNotes = scene.notes || '';
|
||||
this.projectName = project.name;
|
||||
this.projectNotes = project.notes || '';
|
||||
if (this.globalVariables) {
|
||||
this.globalVariables = scene.globalVariables;
|
||||
this.globalVariables = project.globalVariables;
|
||||
}
|
||||
this.stage.destroy();
|
||||
this.add(scene.stage);
|
||||
this.stage = scene.stage;
|
||||
this.add(project.stage);
|
||||
this.stage = project.stage;
|
||||
sprites = this.stage.children.filter(
|
||||
child => child instanceof SpriteMorph
|
||||
);
|
||||
|
|
Ładowanie…
Reference in New Issue