added "shown?" predicate to the stage

pull/89/head
jmoenig 2019-06-01 11:50:12 +02:00
rodzic 10b1dd1d4d
commit ccaa3a03b9
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -387,19 +387,16 @@ SpriteMorph.prototype.initBlocks = function () {
spec: 'size'
},
show: {
only: SpriteMorph,
type: 'command',
category: 'looks',
spec: 'show'
},
hide: {
only: SpriteMorph,
type: 'command',
category: 'looks',
spec: 'hide'
},
reportShown: {
only: SpriteMorph,
type: 'predicate',
category: 'looks',
spec: 'shown?'
@ -7984,6 +7981,7 @@ StageMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('show'));
blocks.push(block('hide'));
blocks.push(block('reportShown'));
// for debugging: ///////////////
@ -8505,6 +8503,8 @@ StageMorph.prototype.show = function () {
this.changed();
};
StageMorph.prototype.reportShown = SpriteMorph.prototype.reportShown;
// StageMorph cloning override
StageMorph.prototype.createClone = nop;