summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-10-04 16:54:16 +0200
committerjmoenig <jens@moenig.org>2013-10-04 16:54:16 +0200
commit020cac64b183ba0edc07d3e3d624390d056f542d (patch)
treedd5ae3f774f040abbcb1cbb7b4dad8b7d00d5fc8 /gui.js
parent4e501e00ad6185fb631d4c6851dfd5383fdc19b7 (diff)
downloadsnap-020cac64b183ba0edc07d3e3d624390d056f542d.tar.gz
snap-020cac64b183ba0edc07d3e3d624390d056f542d.zip
"plain block prototype labels" preference setting
hide / show the (+) symbols in the block editor
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js29
1 files changed, 26 insertions, 3 deletions
diff --git a/gui.js b/gui.js
index b9971f2..debb0b7 100644
--- a/gui.js
+++ b/gui.js
@@ -64,11 +64,11 @@ standardSettings, Sound, BlockMorph, ToggleMorph, InputSlotDialogMorph,
ScriptsMorph, isNil, SymbolMorph, BlockExportDialogMorph,
BlockImportDialogMorph, SnapTranslator, localize, List, InputSlotMorph,
SnapCloud, Uint8Array, HandleMorph, SVG_Costume, fontHeight, hex_sha512,
-sb, CommentMorph, CommandBlockMorph*/
+sb, CommentMorph, CommandBlockMorph, BlockLabelPlaceHolderMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-September-19';
+modules.gui = '2013-October-04';
// Declarations
@@ -1701,7 +1701,8 @@ IDE_Morph.prototype.applySavedSettings = function () {
zoom = this.getSetting('zoom'),
language = this.getSetting('language'),
click = this.getSetting('click'),
- longform = this.getSetting('longform');
+ longform = this.getSetting('longform'),
+ plainprototype = this.getSetting('plainprototype');
// design
if (design === 'flat') {
@@ -1733,6 +1734,11 @@ IDE_Morph.prototype.applySavedSettings = function () {
if (longform) {
InputSlotDialogMorph.prototype.isLaunchingExpanded = true;
}
+
+ // plain prototype labels
+ if (plainprototype) {
+ BlockLabelPlaceHolderMorph.prototype.plainLabel = true;
+ }
};
IDE_Morph.prototype.saveSetting = function (key, value) {
@@ -2096,6 +2102,13 @@ IDE_Morph.prototype.settingsMenu = function () {
'check to always show slot\ntypes in the input dialog'
);
addPreference(
+ 'Plain prototype labels',
+ 'togglePlainPrototypeLabels',
+ BlockLabelPlaceHolderMorph.prototype.plainLabel,
+ 'uncheck to always show (+) symbols\nin block prototype labels',
+ 'check to hide (+) symbols\nin block prototype labels'
+ );
+ addPreference(
'Virtual keyboard',
'toggleVirtualKeyboard',
MorphicPreferences.useVirtualKeyboard,
@@ -3043,6 +3056,16 @@ IDE_Morph.prototype.toggleLongFormInputDialog = function () {
}
};
+IDE_Morph.prototype.togglePlainPrototypeLabels = function () {
+ BlockLabelPlaceHolderMorph.prototype.plainLabel =
+ !BlockLabelPlaceHolderMorph.prototype.plainLabel;
+ if (BlockLabelPlaceHolderMorph.prototype.plainLabel) {
+ this.saveSetting('plainprototype', true);
+ } else {
+ this.removeSetting('plainprototype');
+ }
+};
+
IDE_Morph.prototype.togglePreferEmptySlotDrops = function () {
ScriptsMorph.prototype.isPreferringEmptySlots =
!ScriptsMorph.prototype.isPreferringEmptySlots;