running STOP ALL now also toggles all generic WHEN hat blocks

just like pressing the red STOP sign button
pull/89/head
jmoenig 2019-10-16 16:42:25 +02:00
rodzic bc80df6322
commit aff8e67069
3 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
## in development:
* **New Features:**
* **Notable Changes:**
* running STOP ALL now also toggles (pauses and resumes) all generic WHEN hat blocks (just like pressing the stop button)
* **Notable Fixes:**
* **Translation Updates:**
@ -10,6 +11,7 @@
* new dev version
* morphic: added "enableLinks" flag to text elements, off by default
* widgets: made only URLs inside dialog boxes' bodies clickable
* threads: running STOP ALL now also pauses (pauses and resumes) all generic WHEN hat blocks
## v5.1.1:
* **New Features:**

Wyświetl plik

@ -7,7 +7,7 @@
<script type="text/javascript" src="src/morphic.js?version=2019-10-16"></script>
<script type="text/javascript" src="src/widgets.js?version=2019-10-16"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-08-07"></script>
<script type="text/javascript" src="src/threads.js?version=2019-10-14"></script>
<script type="text/javascript" src="src/threads.js?version=2019-10-16"></script>
<script type="text/javascript" src="src/objects.js?version=2019-10-14"></script>
<script type="text/javascript" src="src/gui.js?version=2019-10-16"></script>
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/
modules.threads = '2019-October-14';
modules.threads = '2019-October-16';
var ThreadManager;
var Process;
@ -1924,6 +1924,12 @@ Process.prototype.doStopAll = function () {
if (this.homeContext.receiver) {
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
if (stage) {
if (stage.enableCustomHatBlocks) {
stage.threads.pauseCustomHatBlocks =
!stage.threads.pauseCustomHatBlocks;
} else {
stage.threads.pauseCustomHatBlocks = false;
}
stage.stopAllActiveSounds();
stage.threads.resumeAll(stage);
stage.keysPressed = {};
@ -1942,7 +1948,8 @@ Process.prototype.doStopAll = function () {
ide = stage.parentThatIsA(IDE_Morph);
if (ide) {
ide.controlBar.pauseButton.refresh();
ide.nextSteps([ // catch forever loops
ide.controlBar.stopButton.refresh();
ide.nextSteps([ // catch forever loops //
nop,
function () {stage.stopAllActiveSounds(); }
]);