kopia lustrzana https://github.com/backface/turtlestitch
introduced default values for expandable slot specs
rodzic
23cf6ca244
commit
de1483fb55
|
@ -48,6 +48,7 @@
|
||||||
* Chinese, thanks, Simon!
|
* Chinese, thanks, Simon!
|
||||||
|
|
||||||
### 2021-10-28
|
### 2021-10-28
|
||||||
|
* introduced default values for expandable slot specs
|
||||||
* updated German translation
|
* updated German translation
|
||||||
* migrated Basque and Swedish translations to new BROADCAST block specs
|
* migrated Basque and Swedish translations to new BROADCAST block specs
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
<script src="src/morphic.js?version=2021-07-09"></script>
|
<script src="src/morphic.js?version=2021-07-09"></script>
|
||||||
<script src="src/symbols.js?version=2021-03-03"></script>
|
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||||
<script src="src/widgets.js?version=2021-10-26"></script>
|
<script src="src/widgets.js?version=2021-10-26"></script>
|
||||||
<script src="src/blocks.js?version=2021-10-22"></script>
|
<script src="src/blocks.js?version=2021-10-28"></script>
|
||||||
<script src="src/threads.js?version=2021-10-22"></script>
|
<script src="src/threads.js?version=2021-10-22"></script>
|
||||||
<script src="src/objects.js?version=2021-10-26"></script>
|
<script src="src/objects.js?version=2021-10-28"></script>
|
||||||
<script src="src/scenes.js?version=2021-10-12"></script>
|
<script src="src/scenes.js?version=2021-10-12"></script>
|
||||||
<script src="src/gui.js?version=2021-10-27"></script>
|
<script src="src/gui.js?version=2021-10-27"></script>
|
||||||
<script src="src/paint.js?version=2021-07-05"></script>
|
<script src="src/paint.js?version=2021-07-05"></script>
|
||||||
|
|
|
@ -160,7 +160,7 @@ CustomCommandBlockMorph, ToggleButtonMorph, DialMorph, SnapExtensions*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.blocks = '2021-October-22';
|
modules.blocks = '2021-October-28';
|
||||||
|
|
||||||
var SyntaxElementMorph;
|
var SyntaxElementMorph;
|
||||||
var BlockMorph;
|
var BlockMorph;
|
||||||
|
@ -312,6 +312,7 @@ SyntaxElementMorph.prototype.labelParts = {
|
||||||
tags: 'numeric read-only unevaluated landscape static'
|
tags: 'numeric read-only unevaluated landscape static'
|
||||||
menu: dictionary or selector
|
menu: dictionary or selector
|
||||||
react: selector
|
react: selector
|
||||||
|
value: string, number or Array for localized strings / constants
|
||||||
*/
|
*/
|
||||||
'%s': {
|
'%s': {
|
||||||
type: 'input'
|
type: 'input'
|
||||||
|
@ -519,7 +520,8 @@ SyntaxElementMorph.prototype.labelParts = {
|
||||||
'%rcv': {
|
'%rcv': {
|
||||||
type: 'input',
|
type: 'input',
|
||||||
tags: 'read-only',
|
tags: 'read-only',
|
||||||
menu: 'receiversMenu'
|
menu: 'receiversMenu',
|
||||||
|
value: ['all']
|
||||||
},
|
},
|
||||||
'%spr': {
|
'%spr': {
|
||||||
type: 'input',
|
type: 'input',
|
||||||
|
@ -1703,6 +1705,17 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
|
||||||
throw new Error('unknown label part type: "' + info.type + '"');
|
throw new Error('unknown label part type: "' + info.type + '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// apply the default value
|
||||||
|
// -----------------------
|
||||||
|
// only for input slots and Boolean inputs,
|
||||||
|
// and only for rare exceptions where we cannot
|
||||||
|
// specify the default values in the block specs,
|
||||||
|
// e.g. for expandable "reeiver" slots in "broadcast"
|
||||||
|
|
||||||
|
if (!isNil(info.value)) {
|
||||||
|
part.setContents(info.value);
|
||||||
|
}
|
||||||
|
|
||||||
// apply the tags
|
// apply the tags
|
||||||
// ---------------
|
// ---------------
|
||||||
// input: numeric, read-only, unevaluated, landscape, static
|
// input: numeric, read-only, unevaluated, landscape, static
|
||||||
|
|
|
@ -87,7 +87,7 @@ BlockVisibilityDialogMorph*/
|
||||||
|
|
||||||
/*jshint esversion: 6*/
|
/*jshint esversion: 6*/
|
||||||
|
|
||||||
modules.objects = '2021-October-26';
|
modules.objects = '2021-October-28';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -762,14 +762,12 @@ SpriteMorph.prototype.initBlocks = function () {
|
||||||
doBroadcast: {
|
doBroadcast: {
|
||||||
type: 'command',
|
type: 'command',
|
||||||
category: 'control',
|
category: 'control',
|
||||||
spec: 'broadcast %msg %receive',
|
spec: 'broadcast %msg %receive'
|
||||||
defaults: [null, ['all']]
|
|
||||||
},
|
},
|
||||||
doBroadcastAndWait: {
|
doBroadcastAndWait: {
|
||||||
type: 'command',
|
type: 'command',
|
||||||
category: 'control',
|
category: 'control',
|
||||||
spec: 'broadcast %msg %receive and wait',
|
spec: 'broadcast %msg %receive and wait'
|
||||||
defaults: [null, ['all']]
|
|
||||||
},
|
},
|
||||||
doWait: {
|
doWait: {
|
||||||
type: 'command',
|
type: 'command',
|
||||||
|
|
Ładowanie…
Reference in New Issue