Adjust font for menu thoughts

This commit is contained in:
Dazed 2024-04-15 19:37:06 -05:00
parent 7ae360258a
commit 2fa174e212
3 changed files with 18 additions and 2 deletions

View file

@ -266,7 +266,7 @@ var $plugins = [
parameters: {
"Max Popup Messages": "10",
"Popup Message Status":
'["{\\"fontFace\\":\\"\\",\\"fontSize\\":\\"28\\",\\"color\\":\\"[\\\\\\"0\\\\\\",\\\\\\"0\\\\\\",\\\\\\"0\\\\\\",\\\\\\"0\\\\\\"]\\",\\"italic\\":\\"false\\",\\"outlineColor\\":\\"15\\",\\"popupHeight\\":\\"40\\",\\"duration\\":\\"90\\"}"]',
'["{\\"fontFace\\":\\"\\",\\"fontSize\\":\\"24\\",\\"color\\":\\"[\\\\\\"0\\\\\\",\\\\\\"0\\\\\\",\\\\\\"0\\\\\\",\\\\\\"0\\\\\\"]\\",\\"italic\\":\\"false\\",\\"outlineColor\\":\\"15\\",\\"popupHeight\\":\\"40\\",\\"duration\\":\\"90\\"}"]',
"Repop Message After Menu": "true",
},
},

View file

@ -287,7 +287,7 @@ Imported.TMSimpleWindow = true;
Window_Simple.prototype.refreshContents = function () {
if (this.width === 0) return;
this.contents.clear();
this.drawTextEx(this._text.replace(/\\n/g, "\n"), 0, 0);
this.drawTextExZori(this._text.replace(/\\n/g, "\n"), 0, 0);
};
Window_Simple.prototype.update = function () {

View file

@ -275,6 +275,22 @@ Window_Base.prototype.drawTextEx = function (text, x, y) {
}
};
Window_Base.prototype.drawTextExZori = function (text, x, y) {
if (text) {
var textState = { index: 0, x: x, y: y, left: x };
textState.text = this.convertEscapeCharacters(text);
textState.height = this.calcTextHeight(textState, false);
this.resetFontSettings();
this.contents.fontSize = 19
while (textState.index < textState.text.length) {
this.processCharacter(textState);
}
return textState.x - x;
} else {
return 0;
}
};
Window_Base.prototype.convertEscapeCharacters = function (text) {
text = text.replace(/\\/g, "\x1b");
text = text.replace(/\x1b\x1b/g, "\\");