You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ycrpg/js/plugins/TitleCommandPosition.js

70 lines
1.9 KiB
JavaScript

3 years ago
//=============================================================================
// TitleCommandPosition.js
//=============================================================================
/*:
* @plugindesc Changes the position of the title command window.
* @author Yoji Ojima
*
* @param Offset X
* @desc The offset value for the x coordinate.
* @default 0
*
* @param Offset Y
* @desc The offset value for the y coordinate.
* @default 0
*
* @param Width
* @desc The width of the command window.
* @default 240
*
* @param Background
* @desc The background type. 0: Normal, 1: Dim, 2: Transparent
* @default 0
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc タイトルコマンドウィンドウの位置を変更します
* @author Yoji Ojima
*
* @param Offset X
* @desc X座標のオフセット値です
* @default 0
*
* @param Offset Y
* @desc Y座標のオフセット値です
* @default 0
*
* @param Width
* @desc コマンドウィンドウの幅です
* @default 240
*
* @param Background
* @desc 背景タイプです0: 通常1: 暗くする2: 透明
* @default 0
*
* @help このプラグインにはプラグインコマンドはありません
*/
(function () {
var parameters = PluginManager.parameters("TitleCommandPosition");
var offsetX = Number(parameters["Offset X"] || 0);
var offsetY = Number(parameters["Offset Y"] || 0);
var width = Number(parameters["Width"] || 240);
var background = Number(parameters["Background"] || 0);
3 years ago
var _Window_TitleCommand_updatePlacement = Window_TitleCommand.prototype.updatePlacement;
Window_TitleCommand.prototype.updatePlacement = function () {
3 years ago
_Window_TitleCommand_updatePlacement.call(this);
this.x += offsetX;
this.y += offsetY;
this.setBackgroundType(background);
};
Window_TitleCommand.prototype.windowWidth = function () {
3 years ago
return width;
};
})();