//=============================================================================
// InfoWindow.js
//=============================================================================

/*:
 * @plugindesc 情報表示ウィンドウをメニュー画面に追加するプラグイン
 * @author Me
 *
 * @help 情報表示ウィンドウをメニュー画面上に追加します。
 *
 */

(function() {

	// マップ上にウィンドウ表示するよ宣言
	var Scene_map_start = Scene_Map.prototype.start;
	Scene_Map.prototype.start = function() {
		Scene_map_start.call(this);
	    this._InfoWindow = new Window_Info();
	    this.addWindow(this._InfoWindow);
	};
    var _Scene_Map_update = Scene_Map.prototype.update;
    Scene_Map.prototype.update = function() {
        _Scene_Map_update.call(this);
        this._InfoWindow.setText();
    };
	
	// ここからメニューウィンドウ作り始まります。
	function Window_Info() {
	    this.initialize.apply(this, arguments);
	}

	Window_Info.prototype = Object.create(Window_Base.prototype);
	Window_Info.prototype.constructor = Window_Info;
	Window_Info.prototype.initialize = function() {
		var x = 0;
		var y = 0;
	    var width = 180;
	    var height = 244;
	    Window_Base.prototype.initialize.call(this, x, y, width, height);
	};

	Window_Info.prototype.setText = function(str) {
		this._text = str;
		this.refresh();
	};
	
	// ウィンドウに載せる内容
	Window_Info.prototype.refresh = function() {
	    this.contents.clear();
		this.resetTextColor();

        // this.drawIcon(210, 1, 1);
		// this.changeTextColor(this.textColor(16));

		this.drawText("カウントMAX",10, 5);
		this.resetTextColor();
		this.drawText($gameVariables.value(9) + "",110,5,40,"right");

		this.drawText("カウント",10, 30);
		this.resetTextColor();
		this.drawText($gameVariables.value(10) + "",110,30,40,"right");

		this.drawText("基本速度",10, 55);
		this.resetTextColor();
		this.drawText($gameVariables.value(12) + "",110,55,40,"right");


		this.drawText("",10, 100);
		this.resetTextColor();
		this.drawText($gameVariables.value(6) + "",110,100,40,"right");

		this.drawText("",10, 125);
		this.resetTextColor();
		this.drawText($gameVariables.value(7) + "",110,125,40,"right");

		this.drawText("モンスター湧き",10, 160);
		this.resetTextColor();
		this.drawText($gameVariables.value(11) + "",110,160,40,"right");

		this.drawText("",10, 190);
		this.resetTextColor();
		this.drawText($gameVariables.value(5) + "",110,190,40,"right");


	};
	
	// フォントサイズ
	Window_Info.prototype.standardFontSize = function() {
    	return 21;
    };
	// ウィンドウの透明度
	Window_Info.prototype.standardBackOpacity = function() {
    	return 100;
	};
    // ウィンドウの余白
	Window_Info.prototype.standardPadding = function() {
    	return 8;
	};
	// ウィンドウの色調
	Window_Info.prototype.updateTone = function() {
    	this.setTone(0, 0, 0);
	};
	
})();