fix a glyp and change to size (as measured everywhere else)

pull/68/head
Michael Aschauer 2018-12-25 11:41:39 -08:00
rodzic 3b06a8a93f
commit 71dc4e5beb
2 zmienionych plików z 277 dodań i 263 usunięć

Wyświetl plik

@ -930,7 +930,12 @@ SpriteMorph.prototype.pointTowards = function (x, y) {
this.setHeading(angle + 90);
};
SpriteMorph.prototype.drawText = function (text, scale) {
SpriteMorph.prototype.drawText = function (text, size) {
size = Math.max(21, size);
return this.drawTextScale(text, size/21.0);
}
SpriteMorph.prototype.drawTextScale = function (text, scale) {
var stage = this.parentThatIsA(StageMorph);
var dest;
var myself = this;
@ -1362,14 +1367,22 @@ SpriteMorph.prototype.initBlocks = function () {
spec: 'point towards x: %n y: %n',
defaults: [0, 0]
};
this.blocks.drawText =
this.blocks.drawTextScale =
{
only: SpriteMorph,
only: SpriteMorph,
type: 'command',
category: 'motion',
spec: 'draw text: %s scale: %n',
defaults: ["hello", 2]
};
this.blocks.drawText =
{
only: SpriteMorph,
type: 'command',
category: 'motion',
spec: 'draw text: %s size: %n',
defaults: ["hello", 21]
};
// pen blocks