only pause generic hat blocks when loading a new project

not when switching to a new scene
snap7
jmoenig 2021-11-18 20:54:30 +01:00
rodzic 8618fd644e
commit 53fc775950
4 zmienionych plików z 19 dodań i 7 usunięć

Wyświetl plik

@ -62,6 +62,9 @@
* Chinese, thanks, Simon!
* Brazilian Portuguese, thank you, Cassiano D'Andrea!
### 2021-11-18
* gui: only pause generic hat blocks when loading a new project, not when switching to a new scene
### 2021-11-17
* gui: set the green-flag button's background color to "active" while a thread is running
* api: changed "processes" method to "isRunning"

Wyświetl plik

@ -20,7 +20,7 @@
<script src="src/threads.js?version=2021-11-15"></script>
<script src="src/objects.js?version=2021-11-15"></script>
<script src="src/scenes.js?version=2021-11-12"></script>
<script src="src/gui.js?version=2021-11-17"></script>
<script src="src/gui.js?version=2021-11-18"></script>
<script src="src/paint.js?version=2021-07-05"></script>
<script src="src/lists.js?version=2021-07-19"></script>
<script src="src/byob.js?version=2021-11-09"></script>

Wyświetl plik

@ -86,7 +86,7 @@ BlockVisibilityDialogMorph, ThreadManager*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2021-November-17';
modules.gui = '2021-November-18';
// Declarations
@ -4717,7 +4717,7 @@ IDE_Morph.prototype.aboutSnap = function () {
module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn,
world = this.world();
aboutTxt = 'Snap! 7 - dev211117 -\nBuild Your Own Blocks\n\n'
aboutTxt = 'Snap! 7 - dev211118 -\nBuild Your Own Blocks\n\n'
+ 'Copyright \u24B8 2008-2021 Jens M\u00F6nig and '
+ 'Brian Harvey\n'
+ 'jens@moenig.org, bh@cs.berkeley.edu\n\n'
@ -5813,11 +5813,18 @@ IDE_Morph.prototype.openProject = function (project) {
}
this.switchToScene(
project.currentScene || project.scenes.at(1),
true // refresh album
true, // refresh album
null, // msg
true // pause generic WHEN hat blocks
);
};
IDE_Morph.prototype.switchToScene = function (scene, refreshAlbum, msg) {
IDE_Morph.prototype.switchToScene = function (
scene,
refreshAlbum,
msg,
pauseHats
) {
var appMode = this.isAppMode;
if (!scene || !scene.stage) {
return;
@ -5832,7 +5839,9 @@ IDE_Morph.prototype.switchToScene = function (scene, refreshAlbum, msg) {
this.add(scene.stage);
this.stage = scene.stage;
this.sprites = scene.sprites;
this.stage.pauseGenericHatBlocks();
if (pauseHats) {
this.stage.pauseGenericHatBlocks();
}
this.createCorral(!refreshAlbum); // keep scenes
this.selectSprite(this.scene.currentSprite);
this.corral.album.updateSelection();

2
sw.js
Wyświetl plik

@ -1,4 +1,4 @@
var snapVersion = '7-dev211117'
var snapVersion = '7-dev211118'
var cacheName = 'snap-pwa',
filesToCache = [