Skip to content

Instantly share code, notes, and snippets.

@triacontane
Last active September 12, 2023 14:59
Show Gist options
  • Save triacontane/4634e70bd98cf9a37a4d48ba9bbbb27b to your computer and use it in GitHub Desktop.
Save triacontane/4634e70bd98cf9a37a4d48ba9bbbb27b to your computer and use it in GitHub Desktop.
タイトルコマンドのウィンドウ幅を変更します。
/*:
* @target MZ
* @plugindesc Changes the width of the title command window.
* @orderBefore NRP_N_TitleMap
*
* @param width
* @text Window Width
* @desc The width of the title command window.
* @type number
* @default 400
*
* @help This plugin allows you to change the width of the title command window.
* Just set the parameter 'width' to the value you want in the Plugin Manager.
*/
(() => {
const parameters = PluginManager.parameters('TitleCommandWidthMZ');
const commandWidth = Number(parameters['width'] || 400);
Scene_Title.prototype.commandWindowRect = function() {
const ww = commandWidth;
const wh = this.calcWindowHeight(3, true);
const wx = (Graphics.boxWidth - ww) / 2;
const wy = Graphics.boxHeight - wh - 96;
return new Rectangle(wx, wy, ww, wh);
};
})();
@triacontane
Copy link
Author

Generated by ChatGPT-4
image

@triacontane
Copy link
Author

簡素なプラグインで作家性は見られないため、パブリックドメインで問題ないと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment