//=============================================================================
// Salvareless Ownuse System
// SOS_公共事件快捷操作功能.js
//=============================================================================
//帮助区段
//由于各种不会,所以代码写得超级乱。
//帮助区段END
//主菜单显示选项区段
// ======================================================================
// * Scene_Menu
// ======================================================================
Scene_Menu.prototype.caozuo_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
this.caozuo_createCommandWindow();
this._commandWindow.setHandler('caozuo', this.command_caozuo.bind(this));
};
Scene_Menu.prototype.command_caozuo = function() {
SceneManager.push(ThirdScene);
};
// ======================================================================
// * Window_MenuCommand
// ======================================================================
Window_MenuCommand.prototype.caozuo_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function() {
this.caozuo_addOriginalCommands();
this.addCommand('能力', 'caozuo', this.areMainCommandsEnabled());
};
//=============================================================================
// ThirdScene.js
//=============================================================================
function LeftWindow(){
this.initialize.apply(this,arguments);
}
LeftWindow.prototype = Object.create(Window_Command.prototype);
LeftWindow.prototype.constructor = LeftWindow;
LeftWindow.prototype.initialize = function(x,y){
Window_Command.prototype.initialize.call(this, x, y);
};
LeftWindow.prototype.windowWidth = function(){
return 736;
};
LeftWindow.prototype.windowHeight = function() {
return 544;
};
LeftWindow.prototype.maxCols = function() {
return 3;
};
LeftWindow.prototype.itemHeight = function() {
return 100;//this.lineHeight();
};
LeftWindow.prototype.itemTextAlign = function() {
return 'center';
};
LeftWindow.prototype.makeCommandList = function(){
if ($gameSwitches.value(1) != true){
this.addCommand("LOCKDE</br>尚未解锁的能力","Dairy0",true);
} else {
this.addCommand("日记一","Dairy1",true);
}
this.addCommand("日记二","Dairy2",true);
this.addCommand("日记三","Dairy3",true);
this.addCommand("日记四","Dairy4",true);
};
function RightWindow(){
this.initialize.apply(this,arguments);
}
RightWindow.prototype = Object.create(Window_Selectable.prototype);
RightWindow.prototype.constructor = RightWindow;
RightWindow.prototype.initialize = function(x,y,width,height){
Window_Selectable.prototype.initialize.call(this,x,y,width,height);
};
function ThirdScene(){
this.initialize.apply(this,arguments);
}
ThirdScene.prototype = Object.create(Scene_MenuBase.prototype);
ThirdScene.prototype.constructor = ThirdScene;
ThirdScene.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
ThirdScene.prototype.createBackground = function(){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture('Convey_7');
this.addChild(this._backgroundSprite);
return;
};
ThirdScene.prototype.create = function(){
Scene_MenuBase.prototype.create.call(this);
this._leftWindow = new LeftWindow(40,40);
this._leftWindow.setHandler("Dairy1",this.commandDairy1.bind(this));
this._leftWindow.setHandler("Dairy2",this.commandDairy1.bind(this));
this._leftWindow.setHandler("Dairy3",this.commandDairy1.bind(this));
this._leftWindow.setHandler("Dairy4",this.commandDairy1.bind(this));
this._leftWindow.setHandler('cancel', this.popScene.bind(this)); //返回用代码
this.addWindow(this._leftWindow);
};
//窗口透明化
var _ThirdScene_create = ThirdScene.prototype.create;
ThirdScene.prototype.create = function(){
_ThirdScene_create.call(this);
this._leftWindow.opacity = 0;
};
//窗口透明化end
ThirdScene.prototype.commandDairy1 = function(){
this._leftWindow.activate();
switch (this._leftWindow.currentSymbol()) {
case 'Dairy1':
SceneManager.goto(Scene_Map);
$gameTemp.reserveCommonEvent(1);
break;
case 'Dairy2':
SceneManager.goto(Scene_Map);
$gameTemp.reserveCommonEvent(1);
break;
case 'Dairy3':
SceneManager.goto(Scene_Map);
$gameTemp.reserveCommonEvent(1);
break;
case 'Dairy4':
SceneManager.goto(Scene_Map);
$gameTemp.reserveCommonEvent(1);
break;
}
};