赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 3 |
经验 | 0 |
最后登录 | 2021-2-1 |
在线时间 | 24 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 269
- 在线时间
- 24 小时
- 注册时间
- 2017-11-1
- 帖子
- 15
|
5楼
楼主 |
发表于 2018-3-10 19:19:12
|
只看该作者
感谢关于include的告知。
我尝试将您的这句this._itemWindow.setCategory("item")放在createItemWindow下,但不知道是由于我使用错误还是方法不行,导致我测试结果没有什么变化。如果您方便,能否帮我看看我这拙劣的代码是否有本质问题;烦扰您的话,也请谅解。无论如何,对您之前能回复我一再感谢。
- Scene_Item.prototype.create = function() {
- Scene_ItemBase.prototype.create.call(this);
- this.createHelpWindow();
- //this.createCategoryWindow();
- this.createItemWindow();
- this.createActorWindow();
- };
- Scene_MenuBase.prototype.createHelpWindow = function() {
- this._helpWindow = new Window_Help();
- this.addWindow(this._helpWindow);
- };
- Window_Help.prototype.initialize = function(numLines) {
- var width = Graphics.boxWidth/2 ;
- var height = this.fittingHeight(numLines || 2);
- Window_Base.prototype.initialize.call(this, Graphics.boxWidth/2, 0, width, Graphics.height);
- this._text = '';
- };
- Scene_Item.prototype.onItemCancel = function() {
- this._itemWindow.deselect();
- //this._categoryWindow.activate();
- };
- Scene_Item.prototype.createItemWindow = function() {
- this._categoryWindow = new Window_ItemCategory();
- this._categoryWindow.setHelpWindow(this._helpWindow);
- this._categoryWindow.y = this._helpWindow.height;
- var wy = this._categoryWindow.y ;
- var wh = Graphics.boxHeight ;//- wy;
- this._itemWindow = new Window_ItemList(0, 0, Graphics.boxWidth/2, wh);
- this._itemWindow.setCategory("item");
- this._itemWindow.setHelpWindow(this._helpWindow);
- this._itemWindow.setHandler('ok', this.onItemOk.bind(this));
- this._itemWindow.setHandler('cancel', this.popScene.bind(this));
- this.addWindow(this._itemWindow);
- //this._categoryWindow.setItemWindow(this._itemWindow);
-
- };
- Window_ItemList.prototype.maxCols = function() {
- return 1;
- };
复制代码 |
|