本帖最后由 alexncf125 于 2023-2-1 14:09 编辑 是被这句控制的 Scene_ItemBase.prototype.showSubWindow = function(window) { window.x = this.isCursorLeft() ? Graphics.boxWidth - window.width : 0; window.show(); window.activate(); }; 那么咱们可以写个插件, 判定了当前场景跟当前窗口后, 更改其xy位置 (function() { var _Scene_ItemBase_showSubWindow = Scene_ItemBase.prototype.showSubWindow; Scene_ItemBase.prototype.showSubWindow = function(window) { _Scene_ItemBase_showSubWindow.call(this); if (this instanceof Scene_Item && window instanceof Window_MenuActor) { window.x = 100; window.y = 100; }; }; }()); |
本帖最后由 alexncf125 于 2023-2-1 01:05 编辑 y轴没变化的原因: Scene_Item.prototype.createCategoryWindow = function() { this._categoryWindow = new Window_ItemCategory(); this._categoryWindow.setHelpWindow(this._helpWindow); this._categoryWindow.y = this._helpWindow.height; this._categoryWindow.setHandler('ok', this.onCategoryOk.bind(this)); this._categoryWindow.setHandler('cancel', this.popScene.bind(this)); this.addWindow(this._categoryWindow); }; 窗口宽度在下一段 Window_ItemCategory.prototype.windowWidth = function() { return Graphics.boxWidth; }; 窗口高度在父类 Window_HorzCommand.prototype.numVisibleRows = function() { return 1; }; 再父类 Window_Command.prototype.windowHeight = function() { return this.fittingHeight(this.numVisibleRows()); }; |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-17 17:30
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.