Remove core.getStatusName

This commit is contained in:
ckcz123 2020-04-30 13:53:50 +08:00
parent faa6589564
commit 0c715674c9
2 changed files with 10 additions and 9 deletions

View File

@ -2075,14 +2075,7 @@ control.prototype.getHeroLoc = function (name) {
return core.status.hero.loc[name];
}
////// 获得某个属性的中文名 //////
control.prototype.getStatusName = function (name) {
var map = {
name: "名称", lv: "等级", hpmax: "生命上限", hp: "生命", manamax: "魔力上限", mana: "魔力",
atk: "攻击", def: "防御", mdef: "魔防", money: "金币", exp: "经验", experience: "经验", steps: "步数"
};
return map[name] || name;
}
////// 获得某个等级的名称 //////
control.prototype.getLvName = function (lv) {

View File

@ -2378,7 +2378,7 @@ ui.prototype._drawEquipbox_drawStatusChanged = function (info, y, equip, equipTy
core.setFont('ui', this._buildFont(14, true));
for (var name in compare) {
var img = core.statusBar.icons[name];
var text = core.getStatusName(name);
var text = this._drawEquipbox_getStatusName(name);
if (img && core.flags.iconInEquipbox) { // 绘制图标
core.drawImage('ui', img, 0, 0, 32, 32, obj.drawOffset, obj.y - 13, 16, 16);
obj.drawOffset += 20;
@ -2400,6 +2400,14 @@ ui.prototype._drawEquipbox_drawStatusChanged = function (info, y, equip, equipTy
}
}
ui.prototype._drawEquipbox_getStatusName = function (name) {
var map = {
name: "名称", lv: "等级", hpmax: "生命上限", hp: "生命", manamax: "魔力上限", mana: "魔力",
atk: "攻击", def: "防御", mdef: "魔防", money: "金币", exp: "经验", experience: "经验", steps: "步数"
};
return map[name] || name;
}
ui.prototype._drawEquipbox_drawStatusChanged_draw = function (text, color, obj) {
var len = core.calWidth('ui', text);
if (obj.drawOffset + len >= core.__PIXELS__) { // 换行