magical-girls-runa-and-nanami/js/plugins/CGPT_levelupwindow.js
2026-02-28 12:33:13 -06:00

32 lines
1.2 KiB
JavaScript

/*:
* @target MZ
* @plugindesc レベルアップウィンドウの背景を半透明または透明に変更する v1.0
* @author ChatGPT
*
* @param Transparent
* @type boolean
* @default false
* @desc 完全に透明にする場合は true。半透明にする場合は false。
*
* @help
* このプラグインは、レベルアップ時に表示されるウィンドウの外観を変更します。
* - 完全透明:ウィンドウの背景もフレームも見えなくなります。
* - 半透明:少し暗く表示されます。
*/
(() => {
const parameters = PluginManager.parameters(document.currentScript.src.split("/").pop().replace(/\.js$/, ""));
const transparent = parameters["Transparent"] === "true";
const _Window_LevelUp_initialize = Window_LevelUp.prototype.initialize;
Window_LevelUp.prototype.initialize = function(rect) {
_Window_LevelUp_initialize.call(this, rect);
if (transparent) {
this.opacity = 0;
this.backOpacity = 0;
} else {
this.opacity = 160; // 半透明に
this.backOpacity = 160;
}
};
})();