可以这样,但是不方便
Window_ActorCommand.prototype.drawItem = function(index) { var rect = this.itemRectForText(index); var align = this.itemTextAlign(); this.resetTextColor(); this.changePaintOpacity(this.isCommandEnabled(index)); var IconIndex = { '攻击':5, '必杀':6, '防御':7, '道具':8 }; this.drawIcon(IconIndex[this.commandName(index)], rect.x, rect.y + 2); this.drawText(this.commandName(index), rect.x +32 , rect.y, rect.width, align); };
Window_ActorCommand.prototype.drawItem = function(index) {
var rect = this.itemRectForText(index);
var align = this.itemTextAlign();
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
var IconIndex = {
'攻击':5,
'必杀':6,
'防御':7,
'道具':8
};
this.drawIcon(IconIndex[this.commandName(index)], rect.x, rect.y + 2);
this.drawText(this.commandName(index), rect.x +32 , rect.y, rect.width, align);
};
|