赞 | 44 |
VIP | 0 |
好人卡 | 0 |
积分 | 62 |
经验 | 240 |
最后登录 | 2024-11-8 |
在线时间 | 604 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 6191
- 在线时间
- 604 小时
- 注册时间
- 2017-9-27
- 帖子
- 251
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
大概写了这么一个场景窗口
为何指令无法移动,光标也不闪动呢?
//命令窗口 function Window_ThmlList() { this.initialize.apply(this, arguments); } Window_ThmlList.prototype = Object.create(Window_Command.prototype); Window_ThmlList.prototype.initialize = function(x, y, width, height) { Window_Command.prototype.initialize.call(this, x, y, width, height); }; Window_ThmlList.prototype.windowWidth = function() { return 120; }; Window_ThmlList.prototype.numVisibleRows = function() { return 2; }; Window_ThmlList.prototype.makeCommandList = function() { this.addCommand("加入", 'jiaru',true); this.addCommand("离开", 'likai',true); }; //状态窗口 function Window_ThztList() { this.initialize.apply(this, arguments); } Window_ThztList.prototype = Object.create(Window_Selectable.prototype); Window_ThztList.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); }; //仓库窗口 function Window_ThjlList() { this.initialize.apply(this, arguments); } Window_ThjlList.prototype = Object.create(Window_Selectable.prototype); Window_ThjlList.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); }; //队伍窗口 function Window_ThlgList() { this.initialize.apply(this, arguments); } Window_ThlgList.prototype = Object.create(Window_Selectable.prototype); Window_ThlgList.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); }; //场景设定 function Scene_Thcz() { this.initialize.apply(this, arguments); } Scene_Thcz.prototype.constructor = Scene_Thcz; Scene_Thcz.prototype = Object.create(Scene_MenuBase.prototype); Scene_Thcz.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); }; Scene_Thcz.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this.createThmlListWindow(); this._command2Window = new Window_ThjlList(120, 228, 120, 276); this._command3Window = new Window_ThztList(240, 120, 464, 384); this.addWindow(this._command2Window); this.addWindow(this._command3Window); }; Scene_Thcz.prototype.update = function() { this._command1Window.activate(); //this._command1Window.refresh(); if (Input.isTriggered('escape') || Input.isTriggered('cancel')) { this._command1Window.hide(); this._command2Window.hide(); this._command3Window.hide(); SceneManager.goto(Scene_Map); } }; Scene_Thcz.prototype.createThmlListWindow = function() { this._command1Window = new Window_ThmlList(120, 120); this._command1Window.setHandler('jiaru', this.commandTh1.bind(this)); this._command1Window.setHandler('likai', this.commandTh2.bind(this)); this._command1Window.setHandler('cancel', this.popScene.bind(this)); this.addWindow(this._command1Window); }; Scene_Thcz.prototype.commandTh1 = function() { this._command2Window.activate(); this._command2indow.selectLast(); this._command1Window.drawText("武器",0,0,100,'left') }; Scene_Thcz.prototype.commandTh2 = function() { };
//命令窗口
function Window_ThmlList() {
this.initialize.apply(this, arguments);
}
Window_ThmlList.prototype = Object.create(Window_Command.prototype);
Window_ThmlList.prototype.initialize = function(x, y, width, height) {
Window_Command.prototype.initialize.call(this, x, y, width, height);
};
Window_ThmlList.prototype.windowWidth = function() {
return 120;
};
Window_ThmlList.prototype.numVisibleRows = function() {
return 2;
};
Window_ThmlList.prototype.makeCommandList = function() {
this.addCommand("加入", 'jiaru',true);
this.addCommand("离开", 'likai',true);
};
//状态窗口
function Window_ThztList() {
this.initialize.apply(this, arguments);
}
Window_ThztList.prototype = Object.create(Window_Selectable.prototype);
Window_ThztList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
};
//仓库窗口
function Window_ThjlList() {
this.initialize.apply(this, arguments);
}
Window_ThjlList.prototype = Object.create(Window_Selectable.prototype);
Window_ThjlList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
};
//队伍窗口
function Window_ThlgList() {
this.initialize.apply(this, arguments);
}
Window_ThlgList.prototype = Object.create(Window_Selectable.prototype);
Window_ThlgList.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
};
//场景设定
function Scene_Thcz() {
this.initialize.apply(this, arguments);
}
Scene_Thcz.prototype.constructor = Scene_Thcz;
Scene_Thcz.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Thcz.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_Thcz.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.createThmlListWindow();
this._command2Window = new Window_ThjlList(120, 228, 120, 276);
this._command3Window = new Window_ThztList(240, 120, 464, 384);
this.addWindow(this._command2Window);
this.addWindow(this._command3Window);
};
Scene_Thcz.prototype.update = function() {
this._command1Window.activate();
//this._command1Window.refresh();
if (Input.isTriggered('escape') || Input.isTriggered('cancel')) {
this._command1Window.hide();
this._command2Window.hide();
this._command3Window.hide();
SceneManager.goto(Scene_Map);
}
};
Scene_Thcz.prototype.createThmlListWindow = function() {
this._command1Window = new Window_ThmlList(120, 120);
this._command1Window.setHandler('jiaru', this.commandTh1.bind(this));
this._command1Window.setHandler('likai', this.commandTh2.bind(this));
this._command1Window.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._command1Window);
};
Scene_Thcz.prototype.commandTh1 = function() {
this._command2Window.activate();
this._command2indow.selectLast();
this._command1Window.drawText("武器",0,0,100,'left')
};
Scene_Thcz.prototype.commandTh2 = function() {
};
|
|