function Window_ActorState() {
this.initialize.apply(this, arguments);
}
Window_ActorState.prototype = Object.create(Window_Selectable.prototype);
Window_ActorState.prototype.constructor = Window_ActorState;
Window_ActorState.prototype.initialize = function() {
var width = 800;
var height = 200;
var x = 0;
var y = 0;
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.refresh();
this.openness = 0;
};
Window_ActorState.prototype.windowWidth = function() {
return Graphics.boxWidth - 192;
};
Window_ActorState.prototype.windowHeight = function() {
return this.fittingHeight(this.numVisibleRows());
};
Window_ActorState.prototype.numVisibleRows = function() {
return 4;
};
Window_ActorState.prototype.maxItems = function() {
return $gameParty.battleMembers().length;
};
Window_ActorState.prototype.refresh = function() {
this.contents.clear();
this.drawAllItems();
};
Window_ActorState.prototype.drawItem = function(index) {
var actor = $gameParty.battleMembers()[index];
this.drawBasicArea(this.basicAreaRect(index), actor);
};
Window_ActorState.prototype.basicAreaRect = function(index) {
var rect = this.itemRectForText(index);
rect.width -= 200;
return rect;
};
Window_ActorState.prototype.gaugeAreaRect = function(index) {
var rect = this.itemRectForText(index);
rect.x += rect.width - this.gaugeAreaWidth();
rect.width = this.gaugeAreaWidth();
return rect;
};
Window_ActorState.prototype.gaugeAreaWidth = function() {
return 330;
};
Window_ActorState.prototype.drawBasicArea = function(rect, actor) {
this.drawActorIcons(actor, rect.x + 156, rect.y, rect.width - 156);
};
//=========================================================================
var old_createAllWindows = Scene_Battle.prototype.createAllWindows
Scene_Battle.prototype.createAllWindows = function() {
old_createAllWindows.call(this)
this.createActorStateWindow();
};
Scene_Battle.prototype.createActorStateWindow = function() {
this._actorStateWindow = new Window_ActorState();
this.addWindow(this._actorStateWindow);
this._actorStateWindow.open();
//sin esta línea no se abre la ventana
};
//=======================================================================
Window_BattleStatus.prototype.drawItem = function(index) {
var actor = $gameParty.battleMembers()[index];
this.drawGaugeArea(this.gaugeAreaRect(index), actor);
};