Window_VariableShowTab.prototype.initialize = function(){
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
Window_Base.prototype.initialize.call(this, 0, 0, width, height);
this.opacity = 0;
this._data = [];
};
Window_VariableShowTab.prototype.update = function(){
this.contents.clear();
for(var i =0;i<this._data.length;i++){
var data = this._data[i];
if(data.isEnabled()){
this.changeTextColor(data._color);
this.drawText(data._t+data.getVariable(),data._x,data._y,data._maxWidth,data._align);
this.resetTextColor();
}
}
};
Window_VariableShowTab.prototype.getDatas = function(){
return this._data;
};
Window_VariableShowTab.prototype.getData = function(id){
var data = null;
for(var i =0;i<this._data.length;i++){
if(this._data[i]._id == id){
data = this._data[i];
break;
}
}
return data;
};
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === 'ShowVariable') {
switch (args[0]) {
case 'initialize':
var data = new VariableData(Number(args[1]),Number(args[2]),Number(args[3]),Number(args[4]),String(args[5]),String(args[6]));
$dataVariables.getDatas().push(data);
break;
case 'show':
$dataVariables.getData(Number(args[1])).setEnabled(true);