diff --git a/js/plugins.js b/js/plugins.js index d7e5615..28dae25 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -12,7 +12,7 @@ var $plugins = [ status: false, description: "名前ウィンドウを調整します。", parameters: { - nameFontSize: "26", + nameFontSize: "22", nameFontColor: "0", nameOutlineColor: "15", heightAdjustment: "0", @@ -75,7 +75,7 @@ var $plugins = [ status: true, description: "フキダシウィンドウプラグイン", parameters: { - FontSize: "22", + FontSize: "20", Padding: "10", AutoPopup: "true", FaceScale: "75", @@ -242,7 +242,7 @@ var $plugins = [ status: true, description: "イベントの上部にテキストを表示します。", parameters: { - nameFontSize: "24", + nameFontSize: "20", nameFontColor: "0", nameOutlineColor: "19", nameDisplayWidth: "500", diff --git a/js/rmmz_windows.js b/js/rmmz_windows.js index b29f1e6..bce80b6 100644 --- a/js/rmmz_windows.js +++ b/js/rmmz_windows.js @@ -114,7 +114,7 @@ Window_Base.prototype.contentsHeight = function () { Window_Base.prototype.resetFontSettings = function () { this.contents.fontFace = $gameSystem.mainFontFace(); - this.contents.fontSize = $gameSystem.mainFontSize(); + this.contents.fontSize = $gameSystem.mainFontSize() - 4; this.resetTextColor(); }; @@ -229,6 +229,14 @@ Window_Base.prototype.drawTextEx = function (text, x, y, width) { return textState.outputWidth; }; +Window_Base.prototype.drawTextExChoice = function (text, x, y, width) { + this.resetFontSettings(); + this.fontSize = 16 + const textState = this.createTextState(text, x, y, width); + this.processAllText(textState); + return textState.outputWidth; +}; + Window_Base.prototype.textSizeEx = function (text) { this.resetFontSettings(); const textState = this.createTextState(text, 0, 0, 0); @@ -237,6 +245,15 @@ Window_Base.prototype.textSizeEx = function (text) { return { width: textState.outputWidth, height: textState.outputHeight }; }; +Window_Base.prototype.textSizeExChoice = function (text) { + this.resetFontSettings(); + this.fontSize = 18 + const textState = this.createTextState(text, 0, 0, 0); + textState.drawing = false; + this.processAllText(textState); + return { width: textState.outputWidth, height: textState.outputHeight }; +}; + Window_Base.prototype.createTextState = function (text, x, y, width) { const rtl = Utils.containsArabic(text); const textState = {}; @@ -4411,7 +4428,7 @@ Window_ChoiceList.prototype.maxChoiceWidth = function () { let maxWidth = 96; const choices = $gameMessage.choices(); for (const choice of choices) { - const textWidth = this.textSizeEx(choice).width; + const textWidth = this.textSizeExChoice(choice).width; const choiceWidth = Math.ceil(textWidth) + this.itemPadding() * 2; if (maxWidth < choiceWidth) { maxWidth = choiceWidth; @@ -4429,7 +4446,7 @@ Window_ChoiceList.prototype.makeCommandList = function () { Window_ChoiceList.prototype.drawItem = function (index) { const rect = this.itemLineRect(index); - this.drawTextEx(this.commandName(index), rect.x, rect.y, rect.width); + this.drawTextExChoice(this.commandName(index), rect.x, rect.y, rect.width); }; Window_ChoiceList.prototype.isCancelEnabled = function () {