(again) randomize pen color when creating a new sprite

upd4.2
jmoenig 2018-05-03 09:13:21 +02:00
rodzic 2a85ed4902
commit 47fd2fd934
2 zmienionych plików z 11 dodań i 6 usunięć

13
gui.js
Wyświetl plik

@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation, BoxMorph, MediaRecorder*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2018-April-27';
modules.gui = '2018-May-03';
// Declarations
@ -2293,14 +2293,15 @@ IDE_Morph.prototype.addNewSprite = function () {
this.stage.add(sprite);
// randomize sprite properties
if (this.world().currentKey === 16) { // shift-click
sprite.setHue(rnd.call(this, 0, 100));
sprite.setBrightness(rnd.call(this, 50, 100));
sprite.turn(rnd.call(this, 1, 360));
}
sprite.setHue(rnd.call(this, 0, 100));
sprite.setBrightness(rnd.call(this, 50, 100));
sprite.setXPosition(rnd.call(this, -220, 220));
sprite.setYPosition(rnd.call(this, -160, 160));
if (this.world().currentKey === 16) { // shift-click
sprite.turn(rnd.call(this, 1, 360));
}
this.sprites.add(sprite);
this.corral.addSprite(sprite);
this.selectSprite(sprite);

Wyświetl plik

@ -4103,3 +4103,7 @@ in development:
* updated German translation
* disabled keyboard shortcuts for green-flag (cmd-enter) and stop (esc) in presentation mode
* Blocks, Threads: added options for sprite attributes to the SET block
180503
------
* GUI: (again) randomize pen color when creating a new sprite