Hello, I am trying to use the \{ and \} text-codes to adjust the text sizes for various words.
However, the effect of these text-codes is way too strong (from looking at the code, it seems that the size is altered in increments of 12, but I'd rather have something like 2 or 4).
Looking through the code, I found this in Line 364 of rpg_windows:
Now in the case of "{" and "}" it calls the functions "makeFontBigger();" and "makeFontSmaller();" respectively.
Finding these functions was not hard, they are found a few lines further:
This looked very promising, so I saved these functions in a little plugin and changed the numbers, but it did not change anything. Note: I am 98% sure the plugin works properly because I have other modified functions in there that work properly.
It needs to be said that I am a novice at JS and as such I could have easily missed something.
So can someone tell me how to change these text-codes?
Any help is greatly appreciated.
However, the effect of these text-codes is way too strong (from looking at the code, it seems that the size is altered in increments of 12, but I'd rather have something like 2 or 4).
Looking through the code, I found this in Line 364 of rpg_windows:
JavaScript:
Window_Base.prototype.processEscapeCharacter = function(code, textState) {
switch (code) {
case 'C':
this.changeTextColor(this.textColor(this.obtainEscapeParam(textState)));
break;
case 'I':
this.processDrawIcon(this.obtainEscapeParam(textState), textState);
break;
case '{':
this.makeFontBigger();
break;
case '}':
this.makeFontSmaller();
break;
}
};
Now in the case of "{" and "}" it calls the functions "makeFontBigger();" and "makeFontSmaller();" respectively.
Finding these functions was not hard, they are found a few lines further:
JavaScript:
Window_Base.prototype.makeFontBigger = function() {
if (this.contents.fontSize <= 96) {
this.contents.fontSize += 12;
}
};
Window_Base.prototype.makeFontSmaller = function() {
if (this.contents.fontSize >= 24) {
this.contents.fontSize -= 12;
}
};
This looked very promising, so I saved these functions in a little plugin and changed the numbers, but it did not change anything. Note: I am 98% sure the plugin works properly because I have other modified functions in there that work properly.
It needs to be said that I am a novice at JS and as such I could have easily missed something.
So can someone tell me how to change these text-codes?
Any help is greatly appreciated.