exorcist-evangeline/www/js/plugins/MenubackGround.js
2025-10-08 13:42:52 -05:00

140 lines
5.4 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//=============================================================================
// MenubackGround.js
//=============================================================================
/*:
* @plugindesc メニュー画面の背景を変更します。
* @author Yoji Ojima, Sasuke KANNAZUKI,
*
* @param backGroundBitmap
* @desc 背景にするビットマップファイルです。
* img/pictures に置いてください。
* @default
*
* @help このプラグインには、プラグインコマンドはありません。
*
* デフォルトのメニューのみ対応。
* AltMenuScreen3.jsから、背景設定機能を移植しました。
* デフォルトのメニューに背景を指定できます。
*
* 使用報告不要・クレジット不要・改変可・商用利用可
* もし何か問題が起きても、当方は一切責任を負いません。ご了承ください。
*/
(function() {
// set parameters
var parameters = PluginManager.parameters('MenubackGround');
var backGroundBitmap = parameters['backGroundBitmap'] || '';
// load bitmap that set in plugin parameter
var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground;
Scene_Menu.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Menu_createBackground.call(this);
};
var _Scene_Item_createBackground = Scene_Item.prototype.createBackground;
Scene_Item.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Item_createBackground.call(this);
};
var _Scene_Skill_createBackground = Scene_Skill.prototype.createBackground;
Scene_Skill.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Skill_createBackground.call(this);
};
var _Scene_Equip_createBackground = Scene_Equip.prototype.createBackground;
Scene_Equip.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Equip_createBackground.call(this);
};
var _Scene_Status_createBackground =
Scene_Status.prototype.createBackground;
Scene_Status.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Status_createBackground.call(this);
};
var _Scene_Options_createBackground =
Scene_Options.prototype.createBackground;
Scene_Options.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_Options_createBackground.call(this);
};
var _Scene_File_createBackground = Scene_File.prototype.createBackground;
Scene_File.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_File_createBackground.call(this);
};
var _Scene_GameEnd_createBackground =
Scene_GameEnd.prototype.createBackground;
Scene_GameEnd.prototype.createBackground = function(){
if(backGroundBitmap){
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap =
ImageManager.loadPicture(backGroundBitmap);
this.addChild(this._backgroundSprite);
return;
}
// if background file is invalid, it does original process.
_Scene_GameEnd_createBackground.call(this);
};
})();