(function() {
var parameters = PluginManager.parameters('ParamBattleWindow');
var windowX = Number(parameters['WindowX'] || 800);
var windowY = Number(parameters['WindowY'] || 450);
var windowWidth = Number(parameters['WindowWidth'] || 300);
var windowHeight = Number(parameters['WindowHeight'] || 300);
var windowFontSize = Number(parameters['WindowFontSize'] || 24);
var windowOpacity = Number(parameters['WindowOpacity'] || 255);
var windowTextColor = String(parameters['WindowTextColor'] || '#ffffff');
var windowOutlineColor = String(parameters['WindowOutlineColor'] || '#000000');
var windowOutlineWidth = Number(parameters['WindowOutlineWidth'] || 4);
var windowOutlineOpacity = Number(parameters['WindowOutlineOpacity'] || 128);
function Window_ParamBattleWindow() {
this.initialize.apply(this, arguments);
}
Window_ParamBattleWindow.prototype = Object.create(Window_Base.prototype);
Window_ParamBattleWindow.prototype.constructor = Window_ParamBattleWindow;
Window_ParamBattleWindow.prototype.initialize = function(x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_ParamBattleWindow.prototype.refresh = function() {
this.contents.clear();
this.contents.fontSize = windowFontSize;
this.contents.paintOpacity = windowOpacity;
this.contents.textColor = windowTextColor;
this.contents.outlineColor = windowOutlineColor;
this.contents.outlineWidth = windowOutlineWidth;
this.contents.outlineOpacity = windowOutlineOpacity;
var activeActor = BattleManager.actor();
if (activeActor && activeActor.actorId()) {
var actorName = activeActor.name();
var actorAtk = activeActor.atk;
var actorMat = activeActor.mat;
var actorAgi = activeActor.agi;
var actorLuk = activeActor.luk;
this.drawText(actorName, 0, 0, this.contentsWidth(), 'left');
this.drawText('ATK: ' + actorAtk, 0, this.lineHeight(), this.contentsWidth(), 'left');
this.drawText('MAT: ' + actorMat, 0, this.lineHeight() * 2, this.contentsWidth(), 'left');
this.drawText('AGI: ' + actorAgi, 0, this.lineHeight() * 3, this.contentsWidth(), 'left');
this.drawText('LUK: ' + actorLuk, 0, this.lineHeight() * 4, this.contentsWidth(), 'left');
}
};
Window_ParamBattleWindow.prototype.update = function() {
Window_Base.prototype.update.call(this);
if (BattleManager.isInputting() && this.isOpen()) {
this.refresh();
}
};
var _Scene_Battle_createAllWindows = Scene_Battle.prototype.createAllWindows;
Scene_Battle.prototype.createAllWindows = function() {
_Scene_Battle_createAllWindows.call(this);
if (BattleManager.actor() && BattleManager.actor().actorId()) {
this.createParamBattleWindow();
}
};
Scene_Battle.prototype.createParamBattleWindow = function() {
this._paramBattleWindow = new Window_ParamBattleWindow(windowX, windowY, windowWidth, windowHeight);
this.addWindow(this._paramBattleWindow);
};
})();