summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2014-02-11 17:55:19 +0100
committerJens Mönig <jens@moenig.org>2014-02-11 17:55:19 +0100
commit3e7891b5a637196130393d51ba6ff2747926995f (patch)
tree3504d46dffac1104e1fcdac9ab2033167454f6b2 /objects.js
parent0e0146a0d805389fed1064a5a94db43b1f0e4d3b (diff)
parent407dbda43fb3e5e5e1af94417c585dd9004d2e6a (diff)
downloadsnap-3e7891b5a637196130393d51ba6ff2747926995f.tar.gz
snap-3e7891b5a637196130393d51ba6ff2747926995f.zip
Merge pull request #288 from cycomachead/dateblock
Create a "Date" Block for Snap
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 9a21465..46a951f 100644
--- a/objects.js
+++ b/objects.js
@@ -804,6 +804,11 @@ SpriteMorph.prototype.initBlocks = function () {
category: 'sensing',
spec: 'set turbo mode to %b'
},
+ reportDate: {
+ type: 'reporter',
+ category: 'sensing',
+ spec: 'current %dates'
+ },
// Operators
reifyScript: {
@@ -1740,6 +1745,8 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('reportIsFastTracking'));
blocks.push(block('doSetFastTracking'));
+ blocks.push('-');
+ blocks.push(block('reportDate'));
// for debugging: ///////////////
@@ -4448,6 +4455,8 @@ StageMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('reportIsFastTracking'));
blocks.push(block('doSetFastTracking'));
+ blocks.push('-');
+ blocks.push(block('reportDate'));
// for debugging: ///////////////
@@ -5197,7 +5206,7 @@ Costume.prototype.shrinkWrap = function () {
};
Costume.prototype.boundingBox = function () {
- // answer the rectangle surrounding my contents' non-transparent pixels
+ // answer the rectangle surrounding my contents' non-transparent pixels
var row,
col,
pic = this.contents,