kopia lustrzana https://github.com/backface/turtlestitch
new "showingExtensions" session setting for showing extension prims in the palette
rodzic
3227d6aea9
commit
13e13a0b05
|
@ -48,6 +48,7 @@
|
|||
|
||||
### 2021-10-26
|
||||
* objects: don't show codification and js-func blocks in search results unless enabled
|
||||
* gui, objects: new "showingExtensions" session setting for showing extension prims in the palette
|
||||
|
||||
### 2021-10-25
|
||||
* byob: fixed #2902
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<script src="src/threads.js?version=2021-10-22"></script>
|
||||
<script src="src/objects.js?version=2021-10-26"></script>
|
||||
<script src="src/scenes.js?version=2021-10-12"></script>
|
||||
<script src="src/gui.js?version=2021-10-20"></script>
|
||||
<script src="src/gui.js?version=2021-10-26"></script>
|
||||
<script src="src/paint.js?version=2021-07-05"></script>
|
||||
<script src="src/lists.js?version=2021-07-19"></script>
|
||||
<script src="src/byob.js?version=2021-10-25"></script>
|
||||
|
|
14
src/gui.js
14
src/gui.js
|
@ -85,7 +85,7 @@ Animation, BoxMorph, BlockDialogMorph, RingMorph, Project, ZERO, BLACK*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.gui = '2021-October-20';
|
||||
modules.gui = '2021-October-26';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -3808,6 +3808,18 @@ IDE_Morph.prototype.settingsMenu = function () {
|
|||
'NOTE: You will have to manually\n' +
|
||||
'sign in again to access your account.' */
|
||||
);
|
||||
addPreference(
|
||||
'Extension blocks',
|
||||
() => {
|
||||
SpriteMorph.prototype.showingExtensions =
|
||||
!SpriteMorph.prototype.showingExtensions;
|
||||
this.flushBlocksCache('variables');
|
||||
this.refreshPalette();
|
||||
},
|
||||
SpriteMorph.prototype.showingExtensions,
|
||||
'uncheck to hide extension\nprimitives in the palette',
|
||||
'check to show extension\nprimitives in the palette'
|
||||
);
|
||||
addPreference(
|
||||
'Add scenes',
|
||||
() => this.isAddingScenes = !this.isAddingScenes,
|
||||
|
|
|
@ -183,6 +183,7 @@ SpriteMorph.prototype.isCachingPrimitives = true;
|
|||
|
||||
SpriteMorph.prototype.enableNesting = true;
|
||||
SpriteMorph.prototype.enableFirstClass = true;
|
||||
SpriteMorph.prototype.showingExtensions = false;
|
||||
SpriteMorph.prototype.useFlatLineEnds = false;
|
||||
SpriteMorph.prototype.highlightColor = new Color(250, 200, 130);
|
||||
SpriteMorph.prototype.highlightBorder = 8;
|
||||
|
@ -2743,13 +2744,8 @@ SpriteMorph.prototype.blockTemplates = function (
|
|||
blocks.push(block('doInsertInList'));
|
||||
blocks.push(block('doReplaceInList'));
|
||||
|
||||
// for debugging: ///////////////
|
||||
if (devMode) {
|
||||
blocks.push('-');
|
||||
blocks.push(this.devModeText());
|
||||
blocks.push('-');
|
||||
blocks.push(block('doShowTable'));
|
||||
blocks.push('-');
|
||||
if (SpriteMorph.prototype.showingExtensions) {
|
||||
blocks.push('=');
|
||||
blocks.push(block('doApplyExtension'));
|
||||
blocks.push(block('reportApplyExtension'));
|
||||
}
|
||||
|
@ -2762,6 +2758,14 @@ SpriteMorph.prototype.blockTemplates = function (
|
|||
blocks.push('-');
|
||||
blocks.push(block('reportMappedCode'));
|
||||
}
|
||||
|
||||
// for debugging: ///////////////
|
||||
if (this.world().isDevMode) {
|
||||
blocks.push('-');
|
||||
blocks.push(this.devModeText());
|
||||
blocks.push('-');
|
||||
blocks.push(block('doShowTable'));
|
||||
}
|
||||
}
|
||||
|
||||
return blocks;
|
||||
|
@ -3194,6 +3198,12 @@ SpriteMorph.prototype.isDisablingBlock = function (aBlock) {
|
|||
if (sel === 'reportJSFunction') {
|
||||
return !Process.prototype.enableJS;
|
||||
}
|
||||
if (
|
||||
sel === 'doApplyExtension' ||
|
||||
sel === 'reportApplyExtension'
|
||||
) {
|
||||
return !SpriteMorph.prototype.showingExtensions;
|
||||
}
|
||||
if (
|
||||
sel === 'doMapCodeOrHeader' ||
|
||||
sel === 'doMapValueCode' ||
|
||||
|
@ -8998,25 +9008,27 @@ StageMorph.prototype.blockTemplates = function (
|
|||
blocks.push(block('doInsertInList'));
|
||||
blocks.push(block('doReplaceInList'));
|
||||
|
||||
if (SpriteMorph.prototype.showingExtensions) {
|
||||
blocks.push('=');
|
||||
blocks.push(block('doApplyExtension'));
|
||||
blocks.push(block('reportApplyExtension'));
|
||||
}
|
||||
|
||||
if (StageMorph.prototype.enableCodeMapping) {
|
||||
blocks.push('=');
|
||||
blocks.push(block('doMapCodeOrHeader'));
|
||||
blocks.push(block('doMapValueCode'));
|
||||
blocks.push(block('doMapListCode'));
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportMappedCode'));
|
||||
}
|
||||
|
||||
// for debugging: ///////////////
|
||||
if (this.world().isDevMode) {
|
||||
blocks.push('-');
|
||||
blocks.push(this.devModeText());
|
||||
blocks.push('-');
|
||||
blocks.push(block('doShowTable'));
|
||||
blocks.push('-');
|
||||
blocks.push(block('doApplyExtension'));
|
||||
blocks.push(block('reportApplyExtension'));
|
||||
}
|
||||
|
||||
blocks.push('=');
|
||||
|
||||
if (StageMorph.prototype.enableCodeMapping) {
|
||||
blocks.push(block('doMapCodeOrHeader'));
|
||||
blocks.push(block('doMapValueCode'));
|
||||
blocks.push(block('doMapListCode'));
|
||||
blocks.push('-');
|
||||
blocks.push(block('reportMappedCode'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue