diff options
| author | jmoenig <jens@moenig.org> | 2014-03-31 13:09:31 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-03-31 13:09:31 +0200 |
| commit | 6fd93533ecb01c27589bfe569d8e22013a77f65c (patch) | |
| tree | 7b3a10d3bad111150b7e040b7e08552e84c41aa2 /objects.js | |
| parent | ca9445c245d6c36f9a53ff3afeef47ff6920b59b (diff) | |
| download | snap-yow-6fd93533ecb01c27589bfe569d8e22013a77f65c.tar.gz snap-yow-6fd93533ecb01c27589bfe569d8e22013a77f65c.zip | |
display costume thumbnails in speech/thought/value bubbles and watcher cells
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -5058,6 +5058,12 @@ SpriteBubbleMorph.prototype.dataAsMorph = function (data) { contents.silentSetWidth(img.width); contents.silentSetHeight(img.height); contents.image = img; + } else if (data instanceof Costume) { + img = data.thumbnail(new Point(40, 40)); + contents = new Morph(); + contents.silentSetWidth(img.width); + contents.silentSetHeight(img.height); + contents.image = img; } else if (data instanceof HTMLCanvasElement) { contents = new Morph(); contents.silentSetWidth(data.width); @@ -5900,6 +5906,12 @@ CellMorph.prototype.drawNew = function () { this.contentsMorph.silentSetWidth(img.width); this.contentsMorph.silentSetHeight(img.height); this.contentsMorph.image = img; + } else if (this.contents instanceof Costume) { + img = this.contents.thumbnail(new Point(40, 40)); + this.contentsMorph = new Morph(); + this.contentsMorph.silentSetWidth(img.width); + this.contentsMorph.silentSetHeight(img.height); + this.contentsMorph.image = img; } else if (this.contents instanceof List) { if (this.isCircular()) { this.contentsMorph = new TextMorph( |
