kopia lustrzana https://github.com/backface/turtlestitch
unified both check mark symbols
rodzic
da6b141353
commit
78f78b2647
|
@ -5410,7 +5410,7 @@ IDE_Morph.prototype.languageMenu = function () {
|
||||||
world = this.world(),
|
world = this.world(),
|
||||||
pos = this.controlBar.settingsButton.bottomLeft(),
|
pos = this.controlBar.settingsButton.bottomLeft(),
|
||||||
tick = new SymbolMorph(
|
tick = new SymbolMorph(
|
||||||
'checkMark',
|
'tick',
|
||||||
MorphicPreferences.menuFontSize * 0.75
|
MorphicPreferences.menuFontSize * 0.75
|
||||||
),
|
),
|
||||||
empty = tick.fullCopy();
|
empty = tick.fullCopy();
|
||||||
|
|
|
@ -91,7 +91,6 @@ SymbolMorph.prototype.names = [
|
||||||
'poster',
|
'poster',
|
||||||
'flash',
|
'flash',
|
||||||
'brush',
|
'brush',
|
||||||
'checkMark',
|
|
||||||
'tick',
|
'tick',
|
||||||
'checkedBox',
|
'checkedBox',
|
||||||
'rectangle',
|
'rectangle',
|
||||||
|
@ -303,9 +302,6 @@ SymbolMorph.prototype.renderShape = function (ctx, aColor) {
|
||||||
case 'brush':
|
case 'brush':
|
||||||
this.renderSymbolBrush(ctx, aColor);
|
this.renderSymbolBrush(ctx, aColor);
|
||||||
break;
|
break;
|
||||||
case 'checkMark':
|
|
||||||
this.renderSymbolCheckMark(ctx, aColor);
|
|
||||||
break;
|
|
||||||
case 'tick':
|
case 'tick':
|
||||||
this.renderSymbolTick(ctx, aColor);
|
this.renderSymbolTick(ctx, aColor);
|
||||||
break;
|
break;
|
||||||
|
@ -1041,23 +1037,7 @@ SymbolMorph.prototype.renderSymbolBrush = function (ctx, color) {
|
||||||
};
|
};
|
||||||
|
|
||||||
SymbolMorph.prototype.renderSymbolTick = function (ctx, color) {
|
SymbolMorph.prototype.renderSymbolTick = function (ctx, color) {
|
||||||
// draw a small check mark
|
// draw a check mark
|
||||||
var w = this.symbolWidth(),
|
|
||||||
h = this.size,
|
|
||||||
l = Math.max(w / 20, 0.5);
|
|
||||||
|
|
||||||
ctx.fillStyle = color.toString();
|
|
||||||
ctx.beginPath();
|
|
||||||
ctx.moveTo(w * 0.2, h * 0.5);
|
|
||||||
ctx.lineTo(w * 0.5, h - l);
|
|
||||||
ctx.lineTo(w - l * 2, l * 2);
|
|
||||||
ctx.lineTo(w * 0.5, h * 0.65);
|
|
||||||
ctx.closePath();
|
|
||||||
ctx.fill();
|
|
||||||
};
|
|
||||||
|
|
||||||
SymbolMorph.prototype.renderSymbolCheckMark = function (ctx, color) {
|
|
||||||
// draw a large check mark
|
|
||||||
var w = this.symbolWidth(),
|
var w = this.symbolWidth(),
|
||||||
h = this.size;
|
h = this.size;
|
||||||
|
|
||||||
|
@ -1067,7 +1047,7 @@ SymbolMorph.prototype.renderSymbolCheckMark = function (ctx, color) {
|
||||||
ctx.lineTo(w * 0.5, h);
|
ctx.lineTo(w * 0.5, h);
|
||||||
ctx.lineTo(w * 0.8, h * 0.3);
|
ctx.lineTo(w * 0.8, h * 0.3);
|
||||||
ctx.lineTo(w, 0);
|
ctx.lineTo(w, 0);
|
||||||
ctx.lineTo(w * 0.8, h * 0.05);
|
ctx.lineTo(w * 0.65, h * 0.2);
|
||||||
ctx.lineTo(w * 0.5, h * 0.65);
|
ctx.lineTo(w * 0.5, h * 0.65);
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
|
|
Ładowanie…
Reference in New Issue