new "shown?" predicate

pull/89/head
jmoenig 2019-06-01 11:41:05 +02:00
rodzic 073f9ca94e
commit 10b1dd1d4d
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -28,6 +28,7 @@
* new "get graphic effect" reporter
* new "get pen attribute" reporter
* new "pen down?" predicate
* new "shown?" predicate
* new "write" command in pen category (used to be "label" in tools)
* new "numbers", "is empty", "map","keep", "find", "combine" and "for each" primitives in list category
* new JIT-compiler "blitz-HOF" primitives for "map", "keep", "find" & "combine" via "compile"
@ -86,6 +87,7 @@
### 2019-06-01
* Objects: new "pen down?" predicate
* Objects: new "shown?" predicate
### 2019-05-31
* Threads: optimized FOREACH performance for large linked lists

Wyświetl plik

@ -398,6 +398,12 @@ SpriteMorph.prototype.initBlocks = function () {
category: 'looks',
spec: 'hide'
},
reportShown: {
only: SpriteMorph,
type: 'predicate',
category: 'looks',
spec: 'shown?'
},
goToLayer: {
only: SpriteMorph,
type: 'command',
@ -2193,6 +2199,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('show'));
blocks.push(block('hide'));
blocks.push(block('reportShown'));
blocks.push('-');
blocks.push(block('goToLayer'));
blocks.push(block('goBack'));
@ -4043,6 +4050,10 @@ SpriteMorph.prototype.show = function () {
this.parts.forEach(function (part) {part.show(); });
};
SpriteMorph.prototype.reportShown = function () {
return this.isVisible;
};
// SpriteMorph pen color
SpriteMorph.prototype.setColorComponentHSVA = function (idx, num) {