shrink a bunch of font sizes

This commit is contained in:
DazedAnon 2024-10-03 22:21:35 -05:00
parent b1f288b670
commit 98b38cf537
2 changed files with 23 additions and 6 deletions

View file

@ -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",

View file

@ -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 () {