fillBoldText parameters
This commit is contained in:
parent
cd682ebbfd
commit
eeac6055f3
@ -514,7 +514,7 @@ core.ui.fillText(name, text, x, y, style, font)
|
||||
text为要绘制的文本,x,y为要绘制的坐标,style可选为绘制的样式,font可选为绘制的字体。(下同)
|
||||
|
||||
|
||||
core.ui.fillBoldText(name, text, style, x, y, font)
|
||||
core.ui.fillBoldText(name, text, x, y, style, font)
|
||||
在某个画布上绘制一个描黑边的文字。
|
||||
|
||||
|
||||
|
||||
@ -1431,7 +1431,7 @@ control.prototype.updateDamage = function (floorId, canvas) {
|
||||
if (core.flags.displayEnemyDamage) {
|
||||
var damageString = core.enemys.getDamageString(id, x, y);
|
||||
var damage = damageString.damage, color = damageString.color;
|
||||
core.fillBoldText(canvas, damage, color, 32*x+1, 32*(y+1)-1);
|
||||
core.fillBoldText(canvas, damage, 32*x+1, 32*(y+1)-1, color);
|
||||
}
|
||||
|
||||
// 临界显伤
|
||||
@ -1440,7 +1440,7 @@ control.prototype.updateDamage = function (floorId, canvas) {
|
||||
if (critical.length>0) critical=critical[0];
|
||||
critical = core.formatBigNumber(critical[0], true);
|
||||
if (critical == '???') critical = '?';
|
||||
core.fillBoldText(canvas, critical, '#FFFFFF', 32*x+1, 32*(y+1)-11);
|
||||
core.fillBoldText(canvas, critical, 32*x+1, 32*(y+1)-11, '#FFFFFF');
|
||||
}
|
||||
|
||||
}
|
||||
@ -1465,7 +1465,7 @@ control.prototype.updateDamage = function (floorId, canvas) {
|
||||
var damage = core.status.checkBlock.damage[x+core.bigmap.width*y];
|
||||
if (damage>0) {
|
||||
damage = core.formatBigNumber(damage, true);
|
||||
core.fillBoldText(canvas, damage, "#FF7F00", 32*x+16, 32*(y+1)-14);
|
||||
core.fillBoldText(canvas, damage, 32*x+16, 32*(y+1)-14, '#FF7F00');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -664,8 +664,8 @@ core.prototype.fillText = function (name, text, x, y, style, font) {
|
||||
}
|
||||
|
||||
////// 在某个canvas上绘制一段描边文字 //////
|
||||
core.prototype.fillBoldText = function (name, text, style, x, y, font) {
|
||||
core.ui.fillBoldText(name, text, style , x, y, font);
|
||||
core.prototype.fillBoldText = function (name, text, x, y, style, font) {
|
||||
core.ui.fillBoldText(name, text, x, y, style, font);
|
||||
}
|
||||
|
||||
////// 在某个canvas上绘制一个矩形 //////
|
||||
|
||||
@ -869,13 +869,13 @@ maps.prototype.__initBlockCanvas = function (block, height, x, y) {
|
||||
var ctx = core.createCanvas(damageCanvas, 0, 0, 32, 32, 65);
|
||||
ctx.textAlign = 'left';
|
||||
ctx.font = "bold 11px Arial";
|
||||
core.fillBoldText(ctx, damage, damageColor, 1, 31);
|
||||
core.fillBoldText(ctx, damage, 1, 31, damageColor);
|
||||
if (core.flags.displayCritical) {
|
||||
var critical = core.enemys.nextCriticals(block.event.id);
|
||||
if (critical.length>0) critical=critical[0];
|
||||
critical = core.formatBigNumber(critical[0], true);
|
||||
if (critical == '???') critical = '?';
|
||||
core.fillBoldText(ctx, critical, '#FFFFFF', 1, 21);
|
||||
core.fillBoldText(ctx, critical, 1, 21, '#FFFFFF');
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
@ -58,10 +58,11 @@ ui.prototype.fillText = function (name, text, x, y, style, font) {
|
||||
}
|
||||
|
||||
////// 在某个canvas上绘制粗体 //////
|
||||
ui.prototype.fillBoldText = function (name, text, style, x, y, font) {
|
||||
ui.prototype.fillBoldText = function (name, text, x, y, style, font) {
|
||||
var ctx = this.getContextByName(name);
|
||||
if (!ctx) return;
|
||||
if (core.isset(font)) ctx.font = font;
|
||||
if (!core.isset(style)) style = ctx.fillStyle;
|
||||
ctx.fillStyle = '#000000';
|
||||
ctx.fillText(text, x-1, y-1);
|
||||
ctx.fillText(text, x-1, y+1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user