| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 21 |
| 经验 | |
| 最后登录 | 2026-10-1 |
| 在线时间 | 1461 小时 |
- 梦石
- 0
- 星屑
- 2117
- 在线时间
- 1461 小时
- 注册时间
- 2009-2-6
- 回帖
- 197

|
楼主 |
发表于 2018-7-7 11:34:44
|
显示全部楼层
是在插件中的,开一个默认工程之后把代码复制过去菜单里面应该会多一个笔记选项,可以打开但是无法返回,我感觉有可能是返回无法找到菜单中光标对应的位置问题但也不一定,我把代码稍微改了改,直接插入插件应该就能显示出菜单中笔记选项,在整队的下面,但是还是无法返回。
- function Window_NoteList()
- {
- this.initialize.apply(this, arguments);
- }
- Window_NoteList.prototype = Object.create(Window_Selectable.prototype);
- //创建构造器
- Window_NoteList.prototype.constructor = Window_NoteList;
- //初始化
- Window_NoteList.prototype.initialize = function(x, y, width, height)
- {
- Window_Selectable.prototype.initialize.call(this, x, y, width, height);
- this.refresh();
- };
- //*窗体的字体设置
- Window_NoteList.prototype.standardFontSize = function() { return 36; }
- //刷新
- Window_NoteList.prototype.refresh = function()
- {
- this.contents.clear();
- this.drawText("测试文字1", 48, 0);
- this.drawText("测试文字2", 48, 48);
- };
- //=============================================================================
- // 绘制场景
- //=============================================================================
- function Scene_CakeNote()
- {
- this.initialize.apply(this, arguments);
- }
- Scene_CakeNote.prototype = Object.create(Scene_MenuBase.prototype);
- //-------------------------------------------------------------
- //构造器
- Scene_CakeNote.prototype.constructor = Scene_CakeNote;
- //初始化
- Scene_CakeNote.prototype.initialize = function()
- {
- Scene_MenuBase.prototype.initialize.call(this);
- };
- Scene_CakeNote.prototype.create = function()
- {
- //在这个界面创建这个场景中的各种窗口
- Scene_MenuBase.prototype.create.call(this);
- this.createNoteListWindow();
- };
- Scene_CakeNote.prototype.createNoteListWindow = function()
- {
- //创建场景中左上方显示笔记列表文字的窗口
- this._NoteListWindow = new Window_NoteList(0, 0, Graphics.boxWidth, Graphics.boxHeight);
- this.addWindow(this._NoteListWindow);
- this._NoteListWindow.setHandler('cancel', this.popScene.bind(this));
- };
- //=============================================================================
- // Scene_Menu
- //=============================================================================
- Scene_Menu.prototype.Scene_Old_CreateCommandWindow = Scene_Menu.prototype.createCommandWindow;
- Scene_Menu.prototype.createCommandWindow = function()
- {
- this.Scene_Old_CreateCommandWindow();
- this._commandWindow.setHandler('note', this.commandNote.bind(this));
- };
- Scene_Menu.prototype.commandNote = function()
- {
- SceneManager.push(Scene_CakeNote);
- };
- //=============================================================================
- // Window_MenuCommand
- //=============================================================================
- Window_MenuCommand.prototype.Window_old_Cake_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
- Window_MenuCommand.prototype.addOriginalCommands = function()
- {
- this.Window_old_Cake_addOriginalCommands();
- this.addCommand("笔记", 'note', true);
- }
复制代码
|
|