Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // DE79_DirectShopNoCategoriesComposer.js
- //=============================================================================
- /*:
- * @plugindesc fix compatibility between JK_DirectShop and NoItemCategories
- * @author Pirobi
- * *
- * @help This plugin does not provide plugin commands.
- * Version 1.0
- *
- */
- (function() {
- Scene_Shop.prototype.createCategoryWindow = function() {
- this._categoryWindow = new Window_ItemCategory();
- this._categoryWindow.setHelpWindow(this._helpWindow);
- this._categoryWindow.y = (this._sellOnly) ? this._helpWindow.y + this._helpWindow.height : this._dummyWindow.y;
- this._categoryWindow.hide();
- this._categoryWindow.deactivate();
- this._categoryWindow.setHandler('ok', this.onCategoryOk.bind(this));
- this._categoryWindow.setHandler('cancel', this.onCategoryCancel.bind(this));
- this.addWindow(this._categoryWindow);
- };
- Scene_Shop.prototype.createSellWindow = function() {
- var wy = (this._sellOnly) ? this._helpWindow.height : this._helpWindow.height + this._categoryWindow.height;
- var wh = (this._sellOnly) ? Graphics.boxHeight - wy - this._goldWindow.height : Graphics.boxHeight - wy;
- this._sellWindow = new Window_ShopSell(0, wy, Graphics.boxWidth, wh);
- this._sellWindow.setHelpWindow(this._helpWindow);
- this._sellWindow.hide();
- this._sellWindow.setHandler('ok', this.onSellOk.bind(this));
- if (this._sellOnly) {
- this._sellWindow.setHandler('cancel', this.popScene.bind(this));
- this._sellWindow.activate();
- this._sellWindow.select(0);
- } else {
- this._sellWindow.setHandler('cancel', this.onSellCancel.bind(this));
- this._sellWindow.select(0);
- }
- this.addWindow(this._sellWindow);
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement