diff options
| author | Jens Mönig <jens@moenig.org> | 2013-04-18 02:17:03 -0700 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2013-04-18 02:17:03 -0700 |
| commit | e00dc98752f341c03f6bf04a23c7e5d5b751d3e8 (patch) | |
| tree | 2d8f6ea70d20e21fe46ffed906746fc0939e4955 /objects.js | |
| parent | 59e7de2b8d0d5291640cc2abbdee98da437a44eb (diff) | |
| parent | 4d694e6bfc950df32e423ce7c43e880e3389d07a (diff) | |
| download | snap-e00dc98752f341c03f6bf04a23c7e5d5b751d3e8.tar.gz snap-e00dc98752f341c03f6bf04a23c7e5d5b751d3e8.zip | |
Merge pull request #40 from queryselector/issue-22
Fixed #22
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1410,6 +1410,12 @@ SpriteMorph.prototype.blockTemplates = function (category) { ); } + function helpMenu() { + var menu = new MenuMorph(this); + menu.addItem('help...', 'showHelp'); + return menu; + } + if (cat === 'motion') { blocks.push(block('forward')); @@ -1686,6 +1692,9 @@ SpriteMorph.prototype.blockTemplates = function (category) { }, 'Make a variable' ); + button.userMenu = helpMenu; + button.selector = 'addVariable'; + button.showHelp = BlockMorph.prototype.showHelp; blocks.push(button); if (this.variables.allNames().length > 0) { @@ -1704,6 +1713,9 @@ SpriteMorph.prototype.blockTemplates = function (category) { }, 'Delete a variable' ); + button.userMenu = helpMenu; + button.selector = 'deleteVariable'; + button.showHelp = BlockMorph.prototype.showHelp; blocks.push(button); } @@ -1770,6 +1782,9 @@ SpriteMorph.prototype.blockTemplates = function (category) { }, 'Make a block' ); + button.userMenu = helpMenu; + button.selector = 'addCustomBlock'; + button.showHelp = BlockMorph.prototype.showHelp; blocks.push(button); } return blocks; |
