From 1f750eb56047320f5c835c8b997f75e5e513d4eb Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 3 Nov 2014 16:32:17 +0100 Subject: add ANY KEY to key hat block (fix #387) --- blocks.js | 1 + 1 file changed, 1 insertion(+) (limited to 'blocks.js') diff --git a/blocks.js b/blocks.js index 73ef884..381c5a3 100644 --- a/blocks.js +++ b/blocks.js @@ -953,6 +953,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { null, false, { + 'any key': ['any key'], 'up arrow': ['up arrow'], 'down arrow': ['down arrow'], 'right arrow': ['right arrow'], -- cgit v1.3.1 From cb4302b455a0ace2d79bd3090f32d913e8ac6612 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 3 Nov 2014 16:32:57 +0100 Subject: add NUMBER KEY to key hat block --- blocks.js | 1 + objects.js | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'blocks.js') diff --git a/blocks.js b/blocks.js index 381c5a3..959948e 100644 --- a/blocks.js +++ b/blocks.js @@ -954,6 +954,7 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { false, { 'any key': ['any key'], + 'number key': ['number key'], 'up arrow': ['up arrow'], 'down arrow': ['down arrow'], 'right arrow': ['right arrow'], diff --git a/objects.js b/objects.js index ecde750..2263883 100644 --- a/objects.js +++ b/objects.js @@ -3488,6 +3488,10 @@ SpriteMorph.prototype.allHatBlocksForKey = function (key) { if (selectedOption === 'any key') { return true; } + if (selectedOption === 'number key' && + (key >= '0' && key <= '9')) { + return true; + } if (selectedOption === key) { return true; } -- cgit v1.3.1