
Text 是支持下划线的,但是不支持中划线,underline = true;
可以修改 laya.core.js
this.underline && this.drawUnderline(textAlgin,x,y,i);
__proto.drawUnderline=function(align,x,y,lineIndex){
var lineWidth=this._lineWidths[lineIndex];
switch (align){
case 'center':
x-=lineWidth / 2;
break ;
case 'right':
x-=lineWidth;
break ;
case 'left':
default :
break ;
}
y+=this._charSize.height;
this._graphics.drawLine(x,y,x+lineWidth,y,this.underlineColor || this.color,1);
}
y 如果 y+=this._charSize.height/2; 就是中划线
可以自己加个变量 控制 例如 linethrough 如果是 true的时候 y+=this._charSize.height/2; false 就是
y+=this._charSize.height