kopia lustrzana https://github.com/backface/turtlestitch
added "shown?" predicate to the stage
rodzic
10b1dd1d4d
commit
ccaa3a03b9
|
@ -387,19 +387,16 @@ SpriteMorph.prototype.initBlocks = function () {
|
||||||
spec: 'size'
|
spec: 'size'
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
only: SpriteMorph,
|
|
||||||
type: 'command',
|
type: 'command',
|
||||||
category: 'looks',
|
category: 'looks',
|
||||||
spec: 'show'
|
spec: 'show'
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
only: SpriteMorph,
|
|
||||||
type: 'command',
|
type: 'command',
|
||||||
category: 'looks',
|
category: 'looks',
|
||||||
spec: 'hide'
|
spec: 'hide'
|
||||||
},
|
},
|
||||||
reportShown: {
|
reportShown: {
|
||||||
only: SpriteMorph,
|
|
||||||
type: 'predicate',
|
type: 'predicate',
|
||||||
category: 'looks',
|
category: 'looks',
|
||||||
spec: 'shown?'
|
spec: 'shown?'
|
||||||
|
@ -7984,6 +7981,7 @@ StageMorph.prototype.blockTemplates = function (category) {
|
||||||
blocks.push('-');
|
blocks.push('-');
|
||||||
blocks.push(block('show'));
|
blocks.push(block('show'));
|
||||||
blocks.push(block('hide'));
|
blocks.push(block('hide'));
|
||||||
|
blocks.push(block('reportShown'));
|
||||||
|
|
||||||
// for debugging: ///////////////
|
// for debugging: ///////////////
|
||||||
|
|
||||||
|
@ -8505,6 +8503,8 @@ StageMorph.prototype.show = function () {
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
StageMorph.prototype.reportShown = SpriteMorph.prototype.reportShown;
|
||||||
|
|
||||||
// StageMorph cloning override
|
// StageMorph cloning override
|
||||||
|
|
||||||
StageMorph.prototype.createClone = nop;
|
StageMorph.prototype.createClone = nop;
|
||||||
|
|
Ładowanie…
Reference in New Issue