From cbc06cef80a255b37453c4f48066ecf0e8fd0f28 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 2 May 2019 11:50:56 +0200 Subject: [PATCH] reordered MY block dropdown by data type --- HISTORY.md | 3 +++ snap.html | 2 +- src/blocks.js | 49 ++++++++++++++++++++++++++++++++----------------- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 02832867..d6adfab6 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -74,6 +74,9 @@ * German * French +### 2019-05-02 +* Blocks: reordered MY block dropdown by data type + ### 2019-04-30 * Blocks, Threads: added "id" to image attributes dropdown * Blocks, Threads: removed "id" from image attributes diff --git a/snap.html b/snap.html index d56568a2..388d7a49 100755 --- a/snap.html +++ b/snap.html @@ -6,7 +6,7 @@ - + diff --git a/src/blocks.js b/src/blocks.js index 7dcaf137..2a19efef 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2019-April-30'; +modules.blocks = '2019-May-02'; var SyntaxElementMorph; var BlockMorph; @@ -8838,31 +8838,46 @@ InputSlotMorph.prototype.typesMenu = function () { }; InputSlotMorph.prototype.gettablesMenu = function () { - var dict = { - neighbors : ['neighbors'], - self : ['self'], - 'other sprites' : ['other sprites'], - clones : ['clones'], - 'other clones' : ['other clones'] - }; - if (SpriteMorph.prototype.enableNesting) { - dict.parts = ['parts']; + var dict = {}, + nest = SpriteMorph.prototype.enableNesting, + oop = StageMorph.prototype.enableInheritance; + + // (single) objects + dict.self = ['self']; + if (nest) { dict.anchor = ['anchor']; } - dict.stage = ['stage']; - if (StageMorph.prototype.enableInheritance) { - dict.children = ['children']; + if (oop) { dict.parent = ['parent']; - if (this.world().isDevMode) { - dict['temporary?'] = ['temporary?']; - } } - dict.name = ['name']; + dict.stage = ['stage']; dict.costume = ['costume']; + + // strings + dict.name = ['name']; + + // lists + if (nest) { + dict.parts = ['parts']; + } + if (oop) { + dict.children = ['children']; + } dict.costumes = ['costumes']; dict.sounds = ['sounds']; + dict.neighbors = ['neighbors']; + dict['other sprites'] = ['other sprites']; + dict.clones = ['clones']; + dict['other clones'] = ['other clones']; + + // Booleans dict['dangling?'] = ['dangling?']; dict['draggable?'] = ['draggable?']; + if (oop && this.world().isDevMode) { + dict['temporary?'] = ['temporary?']; + } + + // numbers dict['rotation style'] = ['rotation style']; dict['rotation x'] = ['rotation x']; dict['rotation y'] = ['rotation y'];