Window_TBSStatus.prototype.refresh = function () {
this.contents.clear();
this._gaugeHeight = null;
this.resetFontSettings();
if (!this._entity) return;
var x, y, w, h;
y += 20;
//- Face
this.drawSprite();
//- Name
x = Lecode.S_TBS.Windows.statusWindowSpriteBoxW;
y = -4;
this.contents.fontSize += 3;
this.changeTextColor(this.systemColor());
this.leU_drawText(this._entity.battler().name(), 0, y);
this.contents.fontSize -= 6;
//- HP Gauge
y += this.lineHeight() - 8;
this.drawActorHp(this._entity.battler(), x, y + 3, 160);
//- MP Gauge
y += this.lineHeight() - 8;
this.drawActorMp(this._entity.battler(), x, y + 3, 160);
//- TP Gauge
if (Lecode.S_TBS.Windows.statusWindowShowTP) {
y += this.lineHeight() - 8;
this.drawActorTp(this._entity.battler(), x, y + 3, 160);
}
//- Move Points
if (Lecode.S_TBS.Windows.statusWindowShowMovePoints) {
y += this.lineHeight() + 4;
var mp = this._entity.getMovePoints();
var gw = (130 - mp * 4) / mp; //14
x++;
for (var i = 0; i < mp; i++) {
this.contents.fillRect(x, y, gw, 2, this.textColor(Lecode.S_TBS.Windows.movePointsColor));
x += gw + 4;
}
}
// - States
x = 96;
y -= this.lineHeight();
var max = Lecode.S_TBS.Windows.statusWindowMaxStates;
this.drawActorIcons(this._entity.battler(), x, y - 46, Window_Base._iconWidth * 5);
};
Window_TBSStatus.prototype.drawSprite = function () {
var bitmap = ImageManager.loadLeTBSStatus(this._entity.filenameID());
var window = this;
bitmap.addLoadListener(function () {
var dx = eval(Lecode.S_TBS.Windows.statusWindowSpriteBoxW) / 2 - bitmap.width / 2;
var dy = 20 + eval(Lecode.S_TBS.Windows.statusWindowSpriteBoxH) / 2 - bitmap.height / 2;
this.contents.blt(bitmap, 0, 0, bitmap.width, bitmap.height, dx, dy);
}.bind(this));
};