//=============================================================================
// AltMenuPokemonXY.js
//=============================================================================

/*:
* @plugindesc Version 1.00 : Allows you to change the menu screen as if
* you are playing Pokemon X or Y from Nintendo.
*
* @author Francis Bercero (AngelicYuuki)
*
*
*@param Number of Menu Rows
*@desc Provide number of menu rows (Default: 7)
*
*@default 7
*
*@param Status Window Width
*@desc Allows you to change width of the status window
* (Default: 600 pixels)
*@default 600
*
*










* @help
*
* --------------------------------------
*|. PLUGIN DETAILS |
* --------------------------------------
*
*
*This plugin will turn your main menu into that as if you are
*playing a Pokemon game like Pokemon X and Y. This plugin
* does have some customization options for you.
*
*---------------------------------------
*| PLUGIN PARAMETERS |
*---------------------------------------
*
* Number of Menu Rows: Allows you to change the number of menu rows.
* This was added for those who have more items to add (Default: 7)
* NOTE: 7 rows will assume that you are using the default menu
*items (save, items, skills, etc)
*
* Status Window Width: Allows you to change the widow width of the
* status window area. Option added for those who have a different
* resoultion (Default: 600).
*
*-------------------------------------
*|. PLUGIN COMMANDS |
*-------------------------------------
*
*There are no plugin commands for this plugin at this time
*
*
*
*
*-------------------------------------
*| PLUGIN CHANGE LOG |
* ------------------------------------
*
* March 28th, 2017
* - Plugin published for the first time
* - Added options to customize menu rows and width of status window
*
*
*
*

*
**

*/


(function() {

var parameters = PluginManager.parameters('AY_AltMenuPokemonXY');
var MenuRows = String(parameters);
var StatusWinWidth = Number (parameters);




var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
_Scene_Menu_create.call(this);
this._statusWindow.x = 200;
this._statusWindow.y = 0;
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
};

Window_MenuCommand.prototype.windowWidth = function() {
return 200;
};

Window_MenuCommand.prototype.maxCols = function() {
return 1;
};

Window_MenuCommand.prototype.numVisibleRows = function() {
return MenuRows;
};

Window_MenuStatus.prototype.windowWidth = function() {
return StatusWinWidth;
};

Window_MenuStatus.prototype.windowHeight = function() {
var h1 = this.fittingHeight(1);
var h2 = this.fittingHeight(2);
return Graphics.boxHeight - h1 - h2;
};

Window_MenuStatus.prototype.maxCols = function() {
return 2;
};

Window_MenuStatus.prototype.numVisibleRows = function() {
return 3;
};

Window_MenuStatus.prototype.drawItemImage = function(index) {
var actor = $gameParty.members();
var rect = this.itemRectForText(index);
var w = Math.min(rect.width, 144);
var h = Math.min(rect.height, 144);
var x = rect.x;
var y = rect.y;
var lineHeight = this.lineHeight();
this.changePaintOpacity(actor.isBattleMember());
this.drawActorFace(actor,x- 50 ,y , 200, 50);
this.changePaintOpacity(true);
};

Window_MenuStatus.prototype.drawItemStatus = function(index) {
var actor = $gameParty.members();
var rect = this.itemRectForText(index);
var x = rect.x;
var y = rect.y;
var width = rect.width;
var bottom = y + rect.height;
var lineHeight = this.lineHeight();


this.drawActorLevel(actor, x,y + 50 ,width);
this.drawActorName(actor,x +50,y - 5 ,width);
this.drawActorHp(actor, x + 50,y + 20,150);
this.drawActorIcons(actor,x + 60,y+ 60,width);

};




var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
Window_MenuActor.prototype.initialize = function() {
_Window_MenuActor_initialize.call(this);
this.y = this.fittingHeight(2);
};

})();