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 Profile Posts

I managed to review my previous lessons on Learn MV and fixed a lot of things. Yay! :kaopride:
I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Forum statistics

Threads
110,410
Messages
1,053,091
Members
143,474
Latest member
Arsyloth
Top