kopia lustrzana https://github.com/backface/turtlestitch
fix spaces and trin
rodzic
4ee307e2be
commit
c181bd46c6
|
@ -217,7 +217,6 @@ tempDict = {
|
||||||
'berechne R\u00f6ntgenbild ...',
|
'berechne R\u00f6ntgenbild ...',
|
||||||
'turn off X-RAY ...':
|
'turn off X-RAY ...':
|
||||||
'beende R\u00f6ntgenbilddarstellung ...',
|
'beende R\u00f6ntgenbilddarstellung ...',
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add attributes to original SnapTranslator.dict.de
|
// Add attributes to original SnapTranslator.dict.de
|
||||||
|
|
|
@ -901,10 +901,15 @@ SpriteMorph.prototype.pointTowards = function (x, y) {
|
||||||
|
|
||||||
SpriteMorph.prototype.drawText = function (text, size) {
|
SpriteMorph.prototype.drawText = function (text, size) {
|
||||||
size = Math.max(21, size);
|
size = Math.max(21, size);
|
||||||
return this.drawTextScale(text, size/21.0);
|
return this.drawTextScale(text, size/21.0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpriteMorph.prototype.drawTextScale = function (text, scale) {
|
SpriteMorph.prototype.drawTextDev = function (text, size, trim) {
|
||||||
|
size = Math.max(21, size);
|
||||||
|
return this.drawTextScale(text, size/21.0, trim);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpriteMorph.prototype.drawTextScale = function (text, scale, trim) {
|
||||||
var stage = this.parentThatIsA(StageMorph);
|
var stage = this.parentThatIsA(StageMorph);
|
||||||
var dest;
|
var dest;
|
||||||
var myself = this;
|
var myself = this;
|
||||||
|
@ -914,7 +919,14 @@ SpriteMorph.prototype.drawTextScale = function (text, scale) {
|
||||||
function doAJump(x, y) {
|
function doAJump(x, y) {
|
||||||
var penState = myself.isDown;
|
var penState = myself.isDown;
|
||||||
myself.isDown = false;
|
myself.isDown = false;
|
||||||
|
if (trim) {
|
||||||
|
myself.gotoXY(x+2, y+2);
|
||||||
|
myself.gotoXY(x-2, y-2);
|
||||||
myself.gotoXY(x, y);
|
myself.gotoXY(x, y);
|
||||||
|
} else {
|
||||||
|
myself.gotoXY(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
//lf.gotoXY(x+2, y+2);
|
//lf.gotoXY(x+2, y+2);
|
||||||
//myself.gotoXY(x, y);
|
//myself.gotoXY(x, y);
|
||||||
myself.isDown = penState;
|
myself.isDown = penState;
|
||||||
|
@ -1410,6 +1422,14 @@ SpriteMorph.prototype.initBlocks = function () {
|
||||||
spec: 'draw text %s with size %n',
|
spec: 'draw text %s with size %n',
|
||||||
defaults: ["hello", 21]
|
defaults: ["hello", 21]
|
||||||
};
|
};
|
||||||
|
this.blocks.drawTextDev =
|
||||||
|
{
|
||||||
|
only: SpriteMorph,
|
||||||
|
type: 'command',
|
||||||
|
category: 'motion',
|
||||||
|
spec: 'draw text %s with size %n trim %b',
|
||||||
|
defaults: ["hello", 2, true]
|
||||||
|
};
|
||||||
this.blocks.getTextLength =
|
this.blocks.getTextLength =
|
||||||
{
|
{
|
||||||
only: SpriteMorph,
|
only: SpriteMorph,
|
||||||
|
|
Ładowanie…
Reference in New Issue