added scene icon thumbnails

snap7
jmoenig 2021-03-30 19:56:33 +02:00
rodzic 7d7b381569
commit 85faa08f83
2 zmienionych plików z 9 dodań i 19 usunięć

Wyświetl plik

@ -6,6 +6,7 @@
* gui: added documentation
* gui: added SceneIconMorph and SceneAlbumMorph prototypes
* gui: turned scenes into an observable list
* gui: added scene icon thumbnails
### 2021-03-25
* gui, scenes: sceneified trash

Wyświetl plik

@ -10121,9 +10121,7 @@ SceneIconMorph.prototype.init = function (aScene) {
this.fps = 1;
};
SceneIconMorph.prototype.createThumbnail =
SpriteIconMorph.prototype.createThumbnail; // +++
/*
SceneIconMorph.prototype.createThumbnail = function () {
if (this.thumbnail) {
this.thumbnail.destroy();
}
@ -10131,21 +10129,12 @@ SceneIconMorph.prototype.createThumbnail =
this.thumbnail = new Morph();
this.thumbnail.isCachingImage = true;
this.thumbnail.bounds.setExtent(this.thumbSize);
if (this.object instanceof SpriteMorph) { // support nested sprites
this.thumbnail.cachedImage = this.object.fullThumbnail(
this.thumbSize,
this.thumbnail.cachedImage
);
this.add(this.thumbnail);
this.createRotationButton();
} else {
this.thumbnail.cachedImage = this.object.thumbnail(
this.thumbSize,
this.thumbnail.cachedImage
);
this.add(this.thumbnail);
}
*/
this.thumbnail.cachedImage = this.object.stage.thumbnail(
this.thumbSize,
this.thumbnail.cachedImage
);
this.add(this.thumbnail);
};
SceneIconMorph.prototype.createLabel
= SpriteIconMorph.prototype.createLabel;
@ -10234,7 +10223,7 @@ SceneIconMorph.prototype.prepareToBeGrabbed = function () {
// SceneAlbumMorph ///////////////////////////////////////////////////////
// I am a watcher on a project's scenes list // +++ to do: make scenes a list
// I am a watcher on a project's scenes list
// SceneAlbumMorph inherits from ScrollFrameMorph