Simon-Mong 2025-07-02 11:26:13 +00:00 zatwierdzone przez GitHub
commit 489fb4e74e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 18 dodań i 5 usunięć

Wyświetl plik

@ -1892,11 +1892,17 @@ SpriteMorph.prototype.initBlocks = function () {
category: 'other'
};
this.blocks.reportPi = {
type: 'reporter',
category: 'operators',
spec: 'PI',
};
this.blocks.reportPi = {
type: 'reporter',
category: 'operators',
spec: 'PI',
};
this.blocks.receiveInteraction = {
type: 'hat',
category: 'control',
spec: 'when stage is %interaction',
defaults: ['clicked']
};
};
SpriteMorph.prototype.initBlocks();
@ -3422,3 +3428,10 @@ SpriteMorph.prototype.palette = function (category) {
}
return this.paletteCache[category];
};
StageMorph.prototype.mouseClickLeft = function () {
let sprite = detect(
this.children,
morph => morph instanceof SpriteMorph);
return sprite.receiveUserInteraction('clicked');
};