paradise-succubus-ac/www/js/plugins/CustomFontStep.js
2026-06-24 05:29:56 -05:00

35 lines
No EOL
981 B
JavaScript

/*:
* @target MV
* @plugindesc Customizes the font size step for \{ and \} text codes.
* @author Ace
*
* @param Font Step Size
* @type number
* @min 1
* @default 4
* @desc How many points to increase/decrease font size per \{ or \} step.
*
* @help
* This plugin changes the default font size step (normally 12) used by
* the \{ and \} text codes in messages.
*
* Example:
* If step size = 4, then \{ increases font size by 4, \} decreases by 4.
*
* Works in both RPG Maker MV and should work inMZ.
*/
(() => {
const parameters = PluginManager.parameters(document.currentScript.src.match(/([^\/]+)\.js$/)[1]);
const stepSize = Number(parameters["Font Step Size"] || 5);
// Override font increase
Window_Base.prototype.makeFontBigger = function() {
this.contents.fontSize += stepSize;
};
// Override font decrease
Window_Base.prototype.makeFontSmaller = function() {
this.contents.fontSize -= stepSize;
};
})();