Yanfly MessageCore Name Box alteration help.

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
49
Reaction score
3
First Language
English
Primarily Uses
Hi All, I've been tinkering with this all day, but what I am trying to do is keep the Name box to the left but have the text inside be centered in the window. I've gotten close. The text is currently acting centered but it is moved a little too the right in the message window and I can't quite figure out why. Probably because I am still pretty dayum noob at directly working with code. Any advice would be very much appreciated. Let me know if you need any other additional information. I have attached a screen shot of how it is behaving and here is the current edit of the code function that I am using:

Code:
Window_NameBox.prototype.refresh = function(text, position) {
    this.show();
    this._lastNameText = text;
    this._text = Yanfly.Param.MSGNameBoxText + text;
    this._position = position;
    this.width = 400;
    this.createContents();
    this.contents.clear();
    this.resetFontSettings();
    this.changeTextColor(this.textColor(Yanfly.Param.MSGNameBoxColor));
    var bleep = this.textWidth(text) / 2;
    var tx = this.width / 2 - bleep;
    this.drawTextEx(this._text, tx, 0);
    this._parentWindow.adjustWindowSettings();
    this._parentWindow.updatePlacement();
    this.adjustPositionX();
    this.adjustPositionY();
    this.open();
    this.activate();
    this._closeCounter = 4;
    return '';
};
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

As for the Coronavirus? Well: "People that spend their life avoiding death are already dead (they're also rich, and I like to spend my life with their money.)"
- R. Sanchez, "Edge of Tomorty: Rick, Die, Repeat"
making pierogi and corrupting my game files wbu
Trying to regain my will to work on maps T_T
I miss working in rpgmaker but I can only do one thing at a time. Maybe after drawing lessons I can come back.
Ever have a day like... you play minesweeper and your very first click is always a mine?

Forum statistics

Threads
94,340
Messages
920,073
Members
124,100
Latest member
Vulgourso
Top