tweak stop all scenes

snap8
Jens Mönig 2022-03-03 23:59:37 +01:00
rodzic 7e7921256f
commit 09071850a6
3 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -2831,7 +2831,7 @@ IDE_Morph.prototype.isPaused = function () {
IDE_Morph.prototype.stopAllScripts = function () { IDE_Morph.prototype.stopAllScripts = function () {
if (this.world().currentKey === 16) { // shiftClicked if (this.world().currentKey === 16) { // shiftClicked
this.scenes.map(scn => scn.stop()); this.scenes.map(scn => scn.stop(true));
} else { } else {
this.scene.stop(); this.scene.stop();
} }

Wyświetl plik

@ -225,10 +225,10 @@ Scene.prototype.updateTrash = function () {
this.trash = this.trash.filter(sprite => sprite.isCorpse); this.trash = this.trash.filter(sprite => sprite.isCorpse);
}; };
Scene.prototype.stop = function () { Scene.prototype.stop = function (forGood) {
if (this.stage.enableCustomHatBlocks) { if (this.stage.enableCustomHatBlocks) {
this.stage.threads.pauseCustomHatBlocks = this.stage.threads.pauseCustomHatBlocks = forGood ? true
!this.stage.threads.pauseCustomHatBlocks; : !this.stage.threads.pauseCustomHatBlocks;
} else { } else {
this.stage.threads.pauseCustomHatBlocks = false; this.stage.threads.pauseCustomHatBlocks = false;
} }

Wyświetl plik

@ -2442,14 +2442,14 @@ Process.prototype.doStop = function () {
this.stop(); this.stop();
}; };
Process.prototype.doStopAll = function () { Process.prototype.doStopAll = function (forGood) {
var stage, ide; var stage, ide;
if (this.homeContext.receiver) { if (this.homeContext.receiver) {
stage = this.homeContext.receiver.parentThatIsA(StageMorph); stage = this.homeContext.receiver.parentThatIsA(StageMorph);
if (stage) { if (stage) {
if (stage.enableCustomHatBlocks) { if (stage.enableCustomHatBlocks) {
stage.threads.pauseCustomHatBlocks = stage.threads.pauseCustomHatBlocks = forGood ? true
!stage.threads.pauseCustomHatBlocks; : !stage.threads.pauseCustomHatBlocks;
} else { } else {
stage.threads.pauseCustomHatBlocks = false; stage.threads.pauseCustomHatBlocks = false;
} }
@ -2482,11 +2482,11 @@ Process.prototype.doStopAllScenes = function () {
ide = this.homeContext.receiver.parentThatIsA(IDE_Morph); ide = this.homeContext.receiver.parentThatIsA(IDE_Morph);
ide.scenes.map(scn => { ide.scenes.map(scn => {
if (scn !== ide.scene) { if (scn !== ide.scene) {
scn.stop(); scn.stop(true);
} }
}); });
} }
this.doStopAll(); this.doStopAll(true);
}; };
Process.prototype.doStopThis = function (choice) { Process.prototype.doStopThis = function (choice) {