//-----------------------------------------------------------------------------
// Window_BattleItem
//
// The window for selecting an item to use on the battle screen.
/**
* The window for selecting an item to use on the battle screen.
*
* @class
* @extends Window_ItemList
*/
function Window_BattleItem() {
this.initialize(...arguments);
}
Window_BattleItem.prototype = Object.create(Window_ItemList.prototype);
Window_BattleItem.prototype.constructor = Window_BattleItem;
Window_BattleItem.prototype.initialize = function(rect) {
Window_ItemList.prototype.initialize.call(this, rect);
this.hide();
};
/**
* Check if an item should be included in the list
*
* @param {Object} The item object to check for inclusion
* @return {boolean} True if the party can use the item
*/
Window_BattleItem.prototype.includes = function(item) {
return $gameParty.canUse(item);
};
Window_BattleItem.prototype.show = function() {
this.selectLast();
this.showHelpWindow();
Window_ItemList.prototype.show.call(this);
};
Window_BattleItem.prototype.hide = function() {
this.hideHelpWindow();
Window_ItemList.prototype.hide.call(this);
};