moon-red-goddess-cornelia/js/plugins/BattleButtonHeight.js
2025-03-31 13:21:45 -05:00

51 lines
1.8 KiB
JavaScript
Raw 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.

/*:
* @plugindesc 戦闘時戻るボタンの高さ調整プラグイン
* @target MZ
* @url https://drive.google.com/drive/u/1/my-drive
* @author さすらいのトム
*
* @param BattleButtonHeight
* @text 戻るボタンの高さ
* @desc 戻るボタンの高さです。高ければ高いほど上に行きます。
* @default
* @type number
* @default 526
*
* @help BattleButtonHeight.js
*
* 戦闘時の戻るボタンの高さを調整出来るようになります。
* プラグインコマンド等は特にないです。
* 利用規約
* クレジットの表記等は特に必要ありません
* ただししていただけると作者が悦びます
* 二次配布や無断転載等につきましても特に規制は設けません
* また、このプラグインを導入し発生したいかなる問題につきましては
* 当方では責任を負いかねます。
*/
(() => {
'use strict';
const parameters = PluginManager.parameters('BattleButtonHeight');
const BattleButtonHeight = Number(parameters['BattleButtonHeight'] || 0);
const Scene_Battle_prototype_buttonY = Scene_Battle.prototype.buttonY;
Scene_Battle.prototype.buttonY = function() {
if ($gameTemp.BattleButtonHeight) {
return Graphics.height - BattleButtonHeight;
}
return Scene_Battle_prototype_buttonY.call(this);
}
const Scene_Battle_prototype_createCancelButton = Scene_Battle.prototype.createCancelButton;
Scene_Battle.prototype.createCancelButton = function() {
$gameTemp.BattleButtonHeight = true;
Scene_Battle_prototype_createCancelButton.call(this);
$gameTemp.BattleButtonHeight = false;
};
})();
Scene_Battle.prototype.createCancelButton = function() {
this._cancelButton.x = 0;
};