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 () {
if (this.world().currentKey === 16) { // shiftClicked
this.scenes.map(scn => scn.stop());
this.scenes.map(scn => scn.stop(true));
} else {
this.scene.stop();
}

Wyświetl plik

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

Wyświetl plik

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