diff options
| author | jmoenig <jens@moenig.org> | 2013-04-05 10:20:18 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-04-05 10:20:18 +0200 |
| commit | a4037b57c1483c613c8322ec15b8c3406e3698c1 (patch) | |
| tree | a6e84d2d097dd01b057b93371031a8597d4bcbac /blocks.js | |
| parent | 2e7ea3c14fc928e33d9040fb48ef9a919f90e8ec (diff) | |
| download | snap-byow-a4037b57c1483c613c8322ec15b8c3406e3698c1.tar.gz snap-byow-a4037b57c1483c613c8322ec15b8c3406e3698c1.zip | |
Variable-names drop-down menu when renaming blobs
renaming variable blobs now features a drop-down menu in the dialog box
with reachable variable names and a picture of the block to be renamed
Diffstat (limited to 'blocks.js')
| -rw-r--r-- | blocks.js | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -153,7 +153,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-April-04'; +modules.blocks = '2013-April-05'; var SyntaxElementMorph; var BlockMorph; @@ -1777,7 +1777,8 @@ BlockMorph.prototype.rebuild = function (contrast) { BlockMorph.prototype.userMenu = function () { var menu = new MenuMorph(this), world = this.world(), - myself = this; + myself = this, + blck; menu.addItem( "help...", @@ -1788,6 +1789,8 @@ BlockMorph.prototype.userMenu = function () { } menu.addLine(); if (this.selector === 'reportGetVar') { + blck = this.fullCopy(); + blck.addShadow(); menu.addItem( 'rename...', function () { @@ -1798,7 +1801,9 @@ BlockMorph.prototype.userMenu = function () { ).prompt( "Variable name", myself.blockSpec, - world + world, + blck.fullImage(), // pic + InputSlotMorph.prototype.getVarNamesDict.call(myself) ); } ); |
