added "code" field to Costume constructor

snap8
Jens Mönig 2022-04-20 16:08:54 +02:00
rodzic 268e78e4fa
commit 76215d06c7
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -45,6 +45,7 @@
* threads: terminate all threads waiting to display a question on ASKing a falsy value
* threads: clear "answer" on ASK nothing/falsy
* byob, blocks: export block definition from inside the block editor
* objects: added "code" field to Costume constructor
### 2022-04-19
* threads: ASK nothing or a falsy value terminates the thread currently displaying a question

Wyświetl plik

@ -18,7 +18,7 @@
<script src="src/widgets.js?version=2021-17-09"></script>
<script src="src/blocks.js?version=2022-04-20"></script>
<script src="src/threads.js?version=2022-04-20"></script>
<script src="src/objects.js?version=2022-04-04"></script>
<script src="src/objects.js?version=2022-04-20"></script>
<script src="src/scenes.js?version=2022-03-03"></script>
<script src="src/gui.js?version=2022-04-06"></script>
<script src="src/paint.js?version=2021-07-05"></script>

Wyświetl plik

@ -93,7 +93,7 @@ BlockVisibilityDialogMorph, CostumeIconMorph, SoundIconMorph, MenuItemMorph*/
/*jshint esversion: 6*/
modules.objects = '2022-April-04';
modules.objects = '2022-April-20';
var SpriteMorph;
var StageMorph;
@ -10403,7 +10403,7 @@ SpriteBubbleMorph.prototype.fixLayout = function () {
/*
I am a picture that's "wearable" by a sprite. My rotationCenter is
relative to my contents position.
relative to my contents position. I can also contain and share code.
*/
// Costume instance creation
@ -10414,6 +10414,7 @@ function Costume(canvas, name, rotationCenter, noFit, maxExtent) {
if (!noFit) {this.shrinkToFit(maxExtent || this.maxExtent()); }
this.name = name || null;
this.rotationCenter = rotationCenter || this.center();
this.code = null;
this.version = Date.now(); // for observer optimization
this.loaded = null; // for de-serialization only
}