Name on statusBar

This commit is contained in:
oc 2018-10-12 00:03:29 +08:00
parent 76a84c5f8f
commit 1e48cf4bd6
2 changed files with 6 additions and 7 deletions

View File

@ -2657,17 +2657,16 @@ control.prototype.updateHeroIcon = function (name) {
core.statusBar.icons.name = name;
var image = core.material.images.hero;
// 全身图
var height = core.material.icons.hero.height;
var ratio = 32 / height, width = 32 * ratio, left = 16-width/2;
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
canvas.width = 32;
canvas.height = 32;
context.drawImage(image, 0, 0, 32, 32, 0, 0, 32, 32);
if (core.material.icons.hero.height>=48) {
context.lineWidth = 5;
context.strokeStyle = '#FFFFFF';
context.strokeRect(0, 0, 32, 32);
}
context.drawImage(image, 0, 0, 32, height, left, 0, width, 32);
core.statusBar.image.name.src = canvas.toDataURL("image/png");
}

View File

@ -187,7 +187,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
},
"flags": {
"enableFloor": true,
"enableName": false,
"enableName": true,
"enableLv": false,
"enableHPMax": false,
"enableMDef": true,