RMMZ Change the arrow (→) fontface and fontsize for all scenes (including custom).

Gigadragon78

Veteran
Veteran
Joined
Feb 2, 2019
Messages
55
Reaction score
17
First Language
Spanish
Primarily Uses
RMMV
Sorry to bother yourselves,i did some kind of strange snippet for changing the arrow size because it looks weird with some fonts. Specially if they are small for example Tahoma,Arial or in this case Trebuchet MS. I put Calibri because it looks nice,but i dont want to modify every plugin that have arrows like for example NUUN Result.
JavaScript:
//-----------------------------------------------------------------------------
Window_EquipStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const nameRect = this.itemLineRect(0);
        this.contents.fontFace = "Trebuchet MS";
        this.contents.fontSize = 18;
        this.drawActorName(this._actor, nameRect.x, 0, nameRect.width);
        this.drawActorFace(this._actor, nameRect.x, nameRect.height);
        this.drawAllParams();
    }
};

Window_EquipStatus.prototype.drawItem = function(x, y, paramId) {
    const paramX = this.paramX();
    const paramWidth = this.paramWidth();
    const rightArrowWidth = this.rightArrowWidth();
    this.drawParamName(x, y, paramId);
    if (this._actor) {
        this.drawCurrentParam(paramX, y, paramId);
    }
    this.drawRightArrow(paramX + paramWidth, y);
    if (this._tempActor) {
        this.drawNewParam(paramX + paramWidth + rightArrowWidth, y, paramId);
    }
};

Window_EquipStatus.prototype.drawParamName = function(x, y, paramId) {
    const width = this.paramX() - this.itemPadding() * 2;
    this.changeTextColor(ColorManager.systemColor());
    this.contents.fontFace = "Trebuchet MS";
    this.contents.fontSize = 18;
    this.drawText(TextManager.param(paramId), x, y, width);
};

Window_EquipStatus.prototype.drawCurrentParam = function(x, y, paramId) {
    const paramWidth = this.paramWidth();
    this.resetTextColor();
    this.contents.fontFace = "Trebuchet MS";
    this.contents.fontSize = 18;
    this.drawText(this._actor.param(paramId), x, y, paramWidth, "right");
};

Window_EquipStatus.prototype.drawRightArrow = function(x, y) {
    const rightArrowWidth = this.rightArrowWidth();
    this.changeTextColor(ColorManager.systemColor());
    this.contents.fontFace = "Calibri";
    this.contents.fontSize = 20;
    this.drawText("\u2192", x, y, rightArrowWidth, "center");
    this.contents.fontFace = "Trebuchet MS";
    this.contents.fontSize = 18;
};

Window_EquipStatus.prototype.drawNewParam = function(x, y, paramId) {
    const paramWidth = this.paramWidth();
    const newValue = this._tempActor.param(paramId);
    const diffvalue = newValue - this._actor.param(paramId);
    this.changeTextColor(ColorManager.paramchangeTextColor(diffvalue));
    this.contents.fontFace = "Trebuchet MS";
    this.contents.fontSize = 18;
    this.drawText(newValue, x, y, paramWidth, "right");
};
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Another character battle theme
Sorry everyone. Covid rules made me a laptop potatoe and I would need more exercise and past 2nd invasion I am still fighting for space also here. So I am not enough often here and... well I answer even less to my e-mails. DC is saying a huge HI to everyone with her heavy wet purrings.

You all take care in here ^^
traficaccidence.jpg
"It's time to add cars into the city!"
--- Famous last word of the developer's character before hit by a car :kaoswt2:
Yay, our new game, Causality is finally released on Steam!

Forum statistics

Threads
110,488
Messages
1,053,682
Members
143,582
Latest member
beru
Top