kopia lustrzana https://github.com/backface/turtlestitch
tweaked more block representations in widgets for fading
rodzic
0bcbaf55de
commit
ab5fbe44d9
|
|
@ -7,6 +7,7 @@
|
||||||
* updated German translation
|
* updated German translation
|
||||||
* gui: tweaked IDE colors for block-fading
|
* gui: tweaked IDE colors for block-fading
|
||||||
* blocks, threads, byob, widgets: tweaked block representations in widgets for fading
|
* blocks, threads, byob, widgets: tweaked block representations in widgets for fading
|
||||||
|
* blocks, byob: tweaked more block representations in widgets for fading
|
||||||
|
|
||||||
### 2020-07-23
|
### 2020-07-23
|
||||||
* morphic: fixed mouseDown events for touch devices
|
* morphic: fixed mouseDown events for touch devices
|
||||||
|
|
|
||||||
|
|
@ -2768,7 +2768,7 @@ BlockMorph.prototype.userMenu = function () {
|
||||||
"Variable name",
|
"Variable name",
|
||||||
myself.blockSpec,
|
myself.blockSpec,
|
||||||
world,
|
world,
|
||||||
blck.fullImage(), // pic
|
blck.doWithAlpha(1, () => blck.fullImage()), // pic
|
||||||
InputSlotMorph.prototype.getVarNamesDict.call(myself)
|
InputSlotMorph.prototype.getVarNamesDict.call(myself)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -3314,7 +3314,7 @@ BlockMorph.prototype.relabel = function (alternativeSelectors) {
|
||||||
block.fixBlockColor(null, true);
|
block.fixBlockColor(null, true);
|
||||||
block.addShadow(new Point(3, 3));
|
block.addShadow(new Point(3, 3));
|
||||||
menu.addItem(
|
menu.addItem(
|
||||||
block.fullImage(),
|
block.doWithAlpha(1, () => block.fullImage()),
|
||||||
() => this.setSelector(selector, -offset)
|
() => this.setSelector(selector, -offset)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
@ -3521,7 +3521,7 @@ BlockMorph.prototype.mapToHeader = function () {
|
||||||
help,
|
help,
|
||||||
pic;
|
pic;
|
||||||
block.addShadow(new Point(3, 3));
|
block.addShadow(new Point(3, 3));
|
||||||
pic = block.fullImage();
|
pic = block.doWithAlpha(1, () => block.fullImage());
|
||||||
if (this.isCustomBlock) {
|
if (this.isCustomBlock) {
|
||||||
help = 'Enter code that corresponds to the block\'s definition. ' +
|
help = 'Enter code that corresponds to the block\'s definition. ' +
|
||||||
'Use the formal parameter\nnames as shown and <body> to ' +
|
'Use the formal parameter\nnames as shown and <body> to ' +
|
||||||
|
|
@ -3558,7 +3558,7 @@ BlockMorph.prototype.mapToCode = function () {
|
||||||
block = this.codeMappingHeader(),
|
block = this.codeMappingHeader(),
|
||||||
pic;
|
pic;
|
||||||
block.addShadow(new Point(3, 3));
|
block.addShadow(new Point(3, 3));
|
||||||
pic = block.fullImage();
|
pic = block.doWithAlpha(1, () => block.fullImage());
|
||||||
new DialogBoxMorph(
|
new DialogBoxMorph(
|
||||||
this,
|
this,
|
||||||
code => {
|
code => {
|
||||||
|
|
@ -3763,7 +3763,7 @@ BlockMorph.prototype.refactorThisVar = function (justTheTemplate) {
|
||||||
'Variable name',
|
'Variable name',
|
||||||
oldName,
|
oldName,
|
||||||
this.world(),
|
this.world(),
|
||||||
cpy.fullImage(), // pic
|
cpy.doWithAlpha(1, () => cpy.fullImage()), // pic
|
||||||
InputSlotMorph.prototype.getVarNamesDict.call(this)
|
InputSlotMorph.prototype.getVarNamesDict.call(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -8906,7 +8906,10 @@ InputSlotMorph.prototype.menuFromDict = function (
|
||||||
if (key[0] === '~') {
|
if (key[0] === '~') {
|
||||||
menu.addLine();
|
menu.addLine();
|
||||||
} else if (key.indexOf('§_def') === 0) {
|
} else if (key.indexOf('§_def') === 0) {
|
||||||
menu.addItem(choices[key].fullImage(), choices[key]);
|
menu.addItem(
|
||||||
|
this.doWithAlpha(1, () => choices[key].fullImage()),
|
||||||
|
choices[key]
|
||||||
|
);
|
||||||
} else if (key.indexOf('§_dir') === 0) {
|
} else if (key.indexOf('§_dir') === 0) {
|
||||||
dial = new DialMorph();
|
dial = new DialMorph();
|
||||||
dial.rootForGrab = function () {return this; };
|
dial.rootForGrab = function () {return this; };
|
||||||
|
|
@ -9753,7 +9756,7 @@ InputSlotMorph.prototype.render = function (ctx) {
|
||||||
// draw my "wish" block, if any
|
// draw my "wish" block, if any
|
||||||
if (this.selectedBlock) {
|
if (this.selectedBlock) {
|
||||||
ctx.drawImage(
|
ctx.drawImage(
|
||||||
this.selectedBlock.fullImage(),
|
this.doWithAlpha(1, () => this.selectedBlock.fullImage()),
|
||||||
this.edge + this.typeInPadding,
|
this.edge + this.typeInPadding,
|
||||||
this.edge
|
this.edge
|
||||||
);
|
);
|
||||||
|
|
|
||||||
12
src/byob.js
12
src/byob.js
|
|
@ -923,7 +923,7 @@ CustomCommandBlockMorph.prototype.edit = function () {
|
||||||
hat.blockCategory,
|
hat.blockCategory,
|
||||||
hat.type,
|
hat.type,
|
||||||
this.world(),
|
this.world(),
|
||||||
block.fullImage(),
|
block.doWithAlpha(1, () => block.fullImage()),
|
||||||
this.isInUse()
|
this.isInUse()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1284,7 +1284,7 @@ CustomCommandBlockMorph.prototype.relabel = function (alternatives) {
|
||||||
block.fixBlockColor(null, true);
|
block.fixBlockColor(null, true);
|
||||||
block.addShadow(new Point(3, 3));
|
block.addShadow(new Point(3, 3));
|
||||||
menu.addItem(
|
menu.addItem(
|
||||||
block.fullImage(),
|
block.doWithAlpha(1, () => block.fullImage()),
|
||||||
() => {
|
() => {
|
||||||
this.definition = def;
|
this.definition = def;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
@ -2211,7 +2211,7 @@ BlockEditorMorph.prototype.close = function () {
|
||||||
'This global block definition contains one or more\n'
|
'This global block definition contains one or more\n'
|
||||||
+ 'local custom blocks which must be removed first.',
|
+ 'local custom blocks which must be removed first.',
|
||||||
this.world(),
|
this.world(),
|
||||||
block.fullImage()
|
block.doWithAlpha(1, () => block.fullImage())
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2228,7 +2228,7 @@ BlockEditorMorph.prototype.close = function () {
|
||||||
'Another custom block with this name exists.\n'
|
'Another custom block with this name exists.\n'
|
||||||
+ 'Would you like to replace it?',
|
+ 'Would you like to replace it?',
|
||||||
this.world(),
|
this.world(),
|
||||||
block.fullImage()
|
block.doWithAlpha(1, () => block.fullImage())
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2379,7 +2379,7 @@ BlockEditorMorph.prototype.editTranslations = function () {
|
||||||
'Custom Block Translations',
|
'Custom Block Translations',
|
||||||
this.translations,
|
this.translations,
|
||||||
this.world(),
|
this.world(),
|
||||||
block.fullImage(),
|
block.doWithAlpha(1, () => block.fullImage()),
|
||||||
this.definition.abstractBlockSpec() +
|
this.definition.abstractBlockSpec() +
|
||||||
'\n\n' +
|
'\n\n' +
|
||||||
localize('Enter one translation per line. ' +
|
localize('Enter one translation per line. ' +
|
||||||
|
|
@ -3477,7 +3477,7 @@ InputSlotDialogMorph.prototype.addSlotTypeButton = function (
|
||||||
query,
|
query,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
element.fullImage(), // delete the "fullImage()" part for interactive
|
element.doWithAlpha(1, () => element.fullImage()),
|
||||||
'rebuild'
|
'rebuild'
|
||||||
);
|
);
|
||||||
button.edge = this.buttonEdge / 2;
|
button.edge = this.buttonEdge / 2;
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue